Uninstall Older (not AI) Version - Advanced Installer Community
cos
Posts: 10
Joined: Mon Dec 27, 2010 11:43 am

Uninstall Older (not AI) Version

Hello,

I need my new AI setup to detect if there is an older version of the app already installer (with Inno Setup) and uninstall it if present.

The steps should be something like:
* Search the Registry for the key HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\MyApp_is1
* From this key read the value QuietUninstallString, which is the path to the old uninstaller
* Launch the old uninstaller and wait for it to complete
* Continue with the new install

How can I do that with AI?

Regards,
Cosmin
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Uninstall Older (not AI) Version

Hi Cosmin,

You can do this from the Search page by adding a new registry location search. The result is stored in a public property that is also the name of the search. You can use this property to condition and launch a "Launch File or Open URL" predefined custom action placed after the RemoveExistingProducts standard action.

For example, the execution condition should be something like:

Code: Select all

UNINSTALLPATH
and in the command line field of the custom action you should have something like:

Code: Select all

[UNINSTALLPATH]
where UNINSTALLPATH is the registry search's name.

Also, if you have trouble understanding launching the uninstall package here is a how to that refers to other kinds of files but can guide you in the right direction.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”