deenairn
Posts: 6
Joined: Tue May 10, 2016 2:12 pm

Cleanup prerequisites directory

Hello,

I've noticed a problem with one of our installers on the cleaning up of the prerequisites directory. This only happens when an installation is interrupted and does not finish cleanly (machine rebooted, process killed, etc). To clarify the situation, we have an installer that takes quite some time to configure features after it is reinstalled. QAs have then been forced to reboot the machine as the installer is not responsive. They then discovered this issue.

One of our prerequisites is an internal product whose version may change - and as this dependent product had changed this problem was discovered. However, I think it could be a legitimate problem for installers that do not exit 'cleanly'.

The prerequisites directory is normally empty at the beginning of an installation. However, if it is not, and a prerequisite is already unzipped to that location - it will not clear the old prerequisites and unzip the new one - Advanced Installer 12.7.2 will just use the contents of the directory. This can cause an issue where the unzipped prerequisite (one left in the directory) is no longer compatible with the application being installed.

To resolve this - I would like to delete the contents of the prerequisites directory at every installation. I appreciate that this may not be the most efficient thing to do - but under the circumstances it is the safest.

Is there a way to do this in Advanced Installer? Is this a known defect / feature of AI?

Regards,

Donald
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Cleanup prerequisites directory

Hi Donald,

I'm not sure why the old prerequisite is not overwritten. Can you reproduce this problem on multiple clean machine or in a new project? If so, can you please send me some sample projects to support at advancedinstaller dot com, so I can test them and try to reproduce and investigate the problem?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
deenairn
Posts: 6
Joined: Tue May 10, 2016 2:12 pm

Re: Cleanup prerequisites directory

Attached is an installer package with MySQL as a prerequisite and nothing else. To replicate, do the following:

1) Start the installer, allow the prerequisite to install and MySQL installation to start.
2) The installer starts MySQL.
3) Cancel the installation of MySQL.
4) Kill the Advanced Installer process.
5) Result is that prerequisites directory is not cleared.
6) Start the installer again.
7) Installer does not download prerequisite as it finds prerequisite in it's directory.
8) Even if exited cleanly, advanced installer will not remove prerequisite either (nor will it ever remove the prerequisite from now on).
Attachments
TestApplication.aip
(18.01 KiB) Downloaded 297 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Cleanup prerequisites directory

Hi Donald,

Indeed, in case the installer related process gets killed, the prerequisite is not cleaned from the machine anymore because the process that should clean that prerequisite was killed.

Then, when the installation is started again the installer applies an "integrity check" on the prerequisite file that already exists in that folder (if this option is selected in the "Setup Files" tab) to see if the prerequisite needs to be downloaded again or not. If the MD5 signature is different between the already existent prerequisite and the one specified in the project, the prerequisite will be downloaded, otherwise it will not be downloaded again.

Indeed, if the "Integrity check" option is not selected, the prerequisite will not be downloaded again even if the file existent on the machine is not the correct one, but it has the same name as the one that should be downloaded.

However, even if the prerequisite file is not removed from the machine, when a new version of that prerequisite will be added to the installer, it will be downloaded and it will replace the already existent one because the MD5 signature will be different.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”