How to tell if uninstall is result of upgrade?

Got a problem you cannot solve? Try here.
Post Reply
Bugger
Posts: 35
Joined: Mon Nov 14, 2005 6:53 pm

How to tell if uninstall is result of upgrade?

Post 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?
sinan
Site Admin
Posts: 1035
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post 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).
Post Reply