CHUG1008
Posts: 9
Joined: Mon Jun 22, 2009 2:08 pm

Uninstalling Prerequisites

Is there any way to trigger the uninstall of any prerequisites that are distributed with the MSI when the user uninstalls the primary application?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Uninstalling Prerequisites

Hello,

Every product that properly installs on the system, i.e having an entry in the "Add/Remove Programs", will have a registry entry under the following key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
This key contains a list of GUIDs (for .msi based installers) or keys that are named after the installed product. Each of these keys contain an UninstallString value which holds a path+command line paramaters that initiate that certain product's uninstallation. This is the place where you should search for the UninstallString of your prerequisite. You will probably want to search for the QuietUninstallString first to initiate a quiet uninstall if this is supported by the prerequisite.

Please note that users may already have had your prerequisite installed before they installed your application. They may not want you to uninstall the prerequisite. You should notify them somehow that you are going to uninstall it along with your product, and give them the choice to prevent that. You can check out our comprehensive guide How do I uninstall another MSI package when my application is uninstalled for more details on how to achieve this.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”