Summary
Uninstall Shortcut InstallScript MSI Project
Synopsis
A Basic MSI installation package can be uninstalled using this command line:
[SystemFolder]Msiexec.exe /x{PRODUCT_CODE}
However, using the same command line for an InstallScript MSI will not uninstall some registry entries, nor would the entry in the Add/Remove Programs applet be removed. This article explains the proper command line to execute the uninstall for an InstallScript MSI project via a shortcut.
Discussion
Uninstall shortcuts for InstallScript MSI projects are launched through a cached version of the setup.exe. This file is cached in the InstallShield Installation Information folder when the installation has completed. Below are the steps to add a shortcut to launch the cached setup.exe for an uninstall shortcut:
- Browse to the Shortcuts view or the Shortcuts view of a component.
- Right-click the desired folder location for the shortcut and select New Shortcut to Preexisting File.
- In the Browse for Shortcut Target dialog, select the [ProgramFilesFolder] folder. Click OK. Name the shortcut created.
- Fill in the Target field for the new shortcut as follows:
[ProgramFilesFolder]InstallShield Installation Information\[ProductCode]\setup.exe
NOTE: Quotes are not required for the shortcut target, they will automatically be placed around the filename and path by Windows Installer at runtime. [ProductCode] will also be replaced at runtime with the Product Code of the MSI package being installed.
-
Fill in the Arguments field for the shortcut as follows:
/runfromtemp /x
When adding an uninstallation shortcut for an InstallScript MSI project, the file that would be launched is IDriver.exe rather than Msiexec.exe. IDriver.exe is installed automatically, and there is no need to manually install this file. Below are the steps to add a shortcut to launch IDriver and uninstall the InstallScript MSI project:
- Browse to the Shortcuts view or the Shortcuts view of a component.
- Right-click and select New Shortcut to Preexisting File.
- In the Browse for Shortcut Target dialog, the directories that will point to Idriver.exe should be made. The subfolders InstallShield\Driver\ x \Intel 32 should be added under the [CommonFilesFolder]. The x is where the appropriate version of IDriver.exe should be indicated; that being a 7 or 8 for Developer 7 or 8 projects respectively, or 9 or 10 for DevStudio 9 or X projects respectively.
- Fill in the Arguments field as follows:
Arguments: /M{Product Code}
{Product Code} would be replaced with your actual product code. It might look similar to the following:
Arguments: /M{7C071035-F334-11D5-818A-00C04F288311}
To find the Product Code for a particular project, follow these steps:- Open project in the InstallShield IDE.
- Select the General Information view.
- Select Product Properties.
- Note the value of the Product Code field in the right panel
Additional Information
InstallShield HelpNet
- Creating Uninstallation Shortcuts for InstallScript Projects
- Creating Uninstallation Shortcuts for Basic MSI Projects
- Setup.exe and Update.exe Command-Line Parameters
InstallShield Knowledge Base
- Setup.exe Command-Line Parameters
- Creating an Uninstall Shortcut For an InstallScript MSI Project via InstallScript.
See "Related Knowledgebase Articles" section for article links.
Related Articles
Add an Unsupported Language to a Basic MSI Project 9Number of Views Detecting If a MSI Setup Is Running from the Add/Remove Programs 7Number of Views Silently Install a Basic MSI Application 8Number of Views Custom Setup.exe Icon Does Not Show on the Taskbar During Installation 10Number of Views What Are the Differences Between Basic MSI and InstallScript MSI Project? 9Number of Views