GarBear
Posts: 1
Joined: Mon Jan 19, 2009 10:59 pm

Automatically un-installing previous versions

Automatically un-installing previous versions

We just recently dumped Wise in favor of Advanced Installer and have a bunch of old installs out there. I have a full list of all the installer numbers, but is there a way to query the Windows Software index programmatically and automatically un-install previous versions?

If not how can I pass the msiexec /X{*} /s before an install. Can I make that a custom Action that only runs if the {HKLM\Software\Microsoft\Windows\Uninstall\{installernumber}} exists?

-Gar
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Automatically un-installing previous versions

Hi Gar,

Since the older packages are MSI, you can simply add their Upgrade Codes in the Upgrades page. This will make your package automatically uninstall the older packages found on the machine. Please note that this approach works only for packages which use the same installation type (per-user or per-machine) as your new package.

Another solution would be to use a BAT file which runs multiple "msiexec /x" commands. The BAT can be added as a temporary file and it can be launched through a Launch file or open URL custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”