mfairbrother
Posts: 29
Joined: Tue Dec 20, 2005 12:39 pm

Upgrades

I thought I had this all worked out, but not quite.

I now have installers at customer sites, where I had setup install/uninstall custom actions. I failed to realize that I needed to add a (NOT UPGRADINGPRODUCTCODE) to the uninstall custom actions to prevent it from being run on upgrades.

So is it possible to remove a file before the previous product starts to uninstall on an upgrade?

Also I need to prevent %ALLUSERPROFILE%\Application Data\XXX from being removed on upgrades. What's the best course of action, move this directory aside and move it back after the previous product has been removed?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
So is it possible to remove a file before the previous product starts to uninstall on an upgrade?
Yes this is possible by using an Immediate Custom Action on the "InstallValidate" section that removes that file.
Also I need to prevent %ALLUSERPROFILE%\Application Data\XXX from being removed on upgrades. What's the best course of action, move this directory aside and move it back after the previous product has been removed?
Yes the best approach on this problem is to backup the directory and restore it after the previous product has been removed. We have a tutorial on how to do this in the Help Documentation. Please follow this link: http://www.advancedinstaller.com/user-g ... le-ca.html

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
mfairbrother
Posts: 29
Joined: Tue Dec 20, 2005 12:39 pm

Gigi,

Thank you for the pointers. One question in the "example" page it mentions using Not Installed, but shouldn't UPGRADINGPRODUCTCODE be used?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

No because the UPGRADINGPRODUCTCODE Property is set if the package is uninstalled by an upgrade (therefore this property is set only for the package that is being removed). Those two custom actions are executed by the upgrade package and not by the previous version of the package.

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”