BPeters
Posts: 17
Joined: Tue Aug 30, 2005 4:58 pm

Custom Action on Uninstall not on Upgrade

Is there any way I can have a Custom Action run only on an Uninstall not on and Upgrade. This custom action cleans up a database and if upgrading application I don't want to perform this action but if uninstalling I do. Is there some conditions I can set to accomplish this.

Thanks,
Brad
BPeters
Posts: 17
Joined: Tue Aug 30, 2005 4:58 pm

Now that I have posted I managed to find the solution myself.

You can condition custom actions that are sequenced after InstallValidate to handle major upgrades by using the UPGRADINGPRODUCTCODE property:

If you want a custom action to run during an uninstallation of the product, but not during the removal of the product by a major upgrade, use this condition.
REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE

If you want a custom action to run only during a major upgrade, use this condition.
UPGRADINGPRODUCTCODE

Return to “Common Problems”