Feature prerequisite file not copied if file already exists - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mabs
Posts: 27
Joined: Tue May 08, 2012 10:04 am

Feature prerequisite file not copied if file already exists

Hello.

I've AI version 9.1.

My project has some feature prerequisites wich are loaded into the project using the "Use files from disk" option. These prerrequisites are some simple C# EXE programs and some data files these programs use.

When I do a first time installation, all these prerrequisites files are copied right to the extraction folder I defined.

If I uninstall the application, the prerrequisites files remains in the extraction folder. Well, this is not a great problem for me.

If I modify the prerrequisites files, then these files get a new modification date and time, and then I build a new installation bootstrapper.

The problem is if I install the new installation pack and the prerrequisite files already exists in the extraction folder, because they aren't overwritted by the new prerrequisite files.

That is, the installation pack doesn't overwrites prerrequisite files ever if they are newer than the existing files.

Can you help me, please?

Best regards!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Feature prerequisite file not copied if file already exi

Hello,

Unfortunately, I cannot reproduce this behavior. I've tested your scenario on Windows XP machine. Can you reproduce this behavior on multiple clean machines?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mabs
Posts: 27
Joined: Tue May 08, 2012 10:04 am

Re: Feature prerequisite file not copied if file already exi

Hello.

I work in a Windows 7 x64 machine.

And I tested and confirm the problem in a Windows XP, in wich the extraction folder where prerrequisite files should be decompressed is C:\Program Files\Common Files\A3\Instal.

It is very easy to reproduce.

For example, in that directory I have two files: file1.exe with date 4/may/2012, and file1.ini with date 11/may/2012. In the new installer bootstrapper they come the same prerequisite files, both with date 18/may/2012. When the installation process finishes, the files remaining in that directory are the original files, not the new files.

Regards.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Feature prerequisite file not copied if file already exi

Hello,

I still cannot reproduce your behavior. I've tested your scenario on Windows XP machine and the prerequisite files always overwrite the old ones. Please keep in mind that if the older version of your prerequisite file has the same name as new version of prerequisite file, then the new file will contain the same created date, but a different modified date. Can you verify if they have different modified dates?

Can you create and attach some samples which manifest this behavior? We need the aips (projects files) and the installer packages.

Please keep in mind that it is recommended to use different extract locations for different package versions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mabs
Posts: 27
Joined: Tue May 08, 2012 10:04 am

Re: Feature prerequisite file not copied if file already exi

Hi.

I created a simple AIP project wich installs some files, two of them already are feature prerrequisites.

In the attached file there are the files:
- The TestPrerrequisitos.AIP project files v1.0 and v1.1.
- The EXE bootstrapper v1.0 containing the A3UnregA3Shared.exe v1.4 and the A3UnregA3Shared.ini files, both of date 10/may/2012.
- The EXE bootstrapper v1.1 containing the A3UnregA3Shared.exe v1.5 and the A3UnregA3Shared.ini files, both of date 18/may/2012.
- The "Old Files" folder containing the original files for the EXE bootstrapper v1.0.
- The "New Files" folder containing the modified files for the EXE bootstrapper v1.1.

You only should execute first the EXE bootstrapper v1.0 and see files installed in the "C:\Program Files (x86)\Common Files\A3\Instal" folder. And then execute the EXE bootstrapper v1.1 and see the files in the same folder. The files remaining after installation are the 10/may/2012 files.

I uses AI v9.1.1 working under Windows 7 x64.

Regards.
Attachments
TestPrerrequisites.zip
(997.15 KiB) Downloaded 500 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Feature prerequisite file not copied if file already exi

Hello,

I tested this and indeed can confirm the behavior. However, our development team has recently improved that area of the application.
Those files should be removed right after install if the projects are built with our latest release. Can you please download and test the same scenario using Advanced Installer 9.2?

Please keep in mind that overwriting the prerequisite files from one version to the next is not intended by design nor recommended.

Each version can have its own prerequisites with dependencies. These resources should be available considering side by side upgrades. Older versions of your product can be subsequently uninstalled and also set with an uninstall command line for its prerequisites as well. If the resources are missing the uninstall will fail.
If each version uses the same prerequisites then their location should be one and the same for all versions.

However, if you have different prerequisites for each version you can try to have different locations for each version's prerequisite and not rely on their modify date. For example you can change the "Extract Location" using the ProductVersion property.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mabs
Posts: 27
Joined: Tue May 08, 2012 10:04 am

Re: Feature prerequisite file not copied if file already exi

Ok Mihai.

I kept in mind all you say.

In our application, the installation location is the same for all versions. Old prerrequisites should be replaced by newer.

I have got the new Advanced Installer 9.2, and I will test this issue.

Regards.

Return to “Common Problems”