Patch Uninstallation

InstallShield 2013

Project: This information applies to the following project types:

Basic MSI
InstallScript MSI—if the InstallScript user interface (UI) style is the new style (which uses the InstallScript engine as an embedded UI handler)
QuickPatch

This information does not apply to InstallScript MSI projects in which the InstallScript UI style is the traditional style (which uses the InstallScript engine as an external UI handler). To learn more, see Using the InstallScript Engine as an External vs. Embedded UI Handler for InstallScript MSI Installations.

Windows Installer 3.0 or later supports the uninstallation of patches for small updates and minor upgrades; the patches to be uninstalled must have been installed with Windows Installer 3.0 or later. When a patch is uninstalled, the product is returned to the state it was in before the patch was uninstalled. With earlier versions of Windows Installer, an end user who wants to remove a patch needs to uninstall the patched product and then reinstall the product without applying the patch. In this case, any patches that should not be removed must be reapplied.

End users can uninstall patches through Add or Remove Programs on systems running Windows XP SP2 and later. For systems running Windows Installer 3.0 or later with earlier versions of Windows, patches must be uninstalled from the command line. For more information, see Uninstalling Patches in the Windows Installer Help Library.

The uninstallation of patches is not enabled by default because not all patches can be uninstalled. Following are examples of scenarios in which a patch cannot be uninstalled, or when certain functionality does not work during patch uninstallation:

A major upgrade packaged as a patch cannot be uninstalled.
If a patch adds a row to certain Windows Installer tables, the patch cannot be uninstalled. If your patch adds a row to any of these tables, one of the patch validators (Val0015) warns you that the patch will not be uninstallable. For a list of the applicable tables, see Val0015.
It is possible that an end user may not be able to remove a patch that adds content to the RemoveFile or RemoveRegistry tables. If the patch is designed to remove a file or registry entry that was not included in the original installation package, uninstalling the patch will not restore that file or registry entry.
If you create an uninstallable patch that contains SQL script support that was added through the SQL Scripts view, the SQL script will not run during the patch uninstallation.

It is recommended that you thoroughly test the uninstallation of your patch before deploying it to your end users. To learn more about patches that are not uninstallable, see Uninstallable Patches in the Windows Installer Help Library.

See Also