Page 1 of 1

How to tell if uninstall is result of upgrade?

Posted: Wed Nov 16, 2005 2:44 pm
by Bugger
I have a situation where I need to launch an exe before uninstall, but only if the uninstall is NOT the result of an upgrade to a newer version.

What's the best way to determine this? In installshield, I would check the UPGRADINGPRODUCTCODE var, is there an equivalent in InstallAware?

Posted: Wed Nov 16, 2005 5:26 pm
by sinan
When InstallAware automatically uninstalls, it undoes every Windows Installer action that was carried out as part of your installation. These are easy to identify in your setup script - they are displayed in purple color with default syntax highlighting.

Run Program is not one of those commands, so it will not execute - your issue is automatically solved. If you had the opposite situation - wherein you needed the custom commands to execute - that is also easy to achieve by silently running the uninstall program from the command line (instead of using the (Un)Install MSI Setup plug-in, which is the default behavior for auto-upgrades).