Quick links: Download InstallMate 9 | What's new in InstallMate 9 | Buy InstallMate 9 | Upgrading to InstallMate 9 | Recent news...

Uninstall - Uninstall a program from the command line

Uninstall.exe uninstalls a program from the command line (i.e., without going through the Add/Remove Programs control panel). It can also list information about installed programs. This program can be used in batch files and as a custom action in installers.

(Note that ExpertInstall 3, Installer 5, and InstallMate 7 have built-in Uninstall Product actions that offer equivalent functionality.)

Terms of use

This program is copyright © 1990-2012 Tarma Software Research Pty Ltd.

You may freely use this program for personal or internal business uses only. You may not incorporate the program either wholly or in part into any product or publication, or otherwise distribute the program without express written permission from Tarma Software Research Pty Ltd. However, you may provide links to this program's web page.

Tarma Software Research Pty Ltd is not liable for errors or omissions in this program.

Download

The download package contains the following versions of the Uninstall program:

  • UninstallA.exe: 32-bit ANSI; only recommended for Windows 9x, but will run on all other platforms as well.
  • UninstallW.exe: 32-bit Unicode, recommended for all 32-bit NT-based (NT4, 2000, XP, 2003, Vista, 2008, 7, 8), plus any IA64 systems. Can also be used on x64 systems.
  • UninstallX64.exe: x64 Unicode, can only be used on x64 systems (not on IA64).

System requirements: Runs on all Windows 9x and later versions, including NT4, 2000, XP, Vista, 7, 8, and their Server editions, in both 32-bit and 64-bit versions, as indicated above for the ...A, ...W, and ...X64 variations.

Syntax

Uninstall [/a][/f][/c[/q]]      - display uninstall list
Uninstall [/q][/w] keyname...   - run 'keyname' uninstaller
Uninstall  /l [/f] keyname...   - display 'keyname' information
Uninstall  /c [/q] keyname...   - display 'keyname' uninstall command

Uninstall lists or runs registered uninstallers. If one or more keyname(s) are specified, the corresponding uninstallers are started or their information displayed. If no keyname(s) are given, then the registered uninstallers are listed on the standard output.

Parameter Description
Uninstall

Name of the program; .exe is implied. You may have to use a fully qualified file path if Uninstall.exe is located in a folder that does not appear in your PATH environment variable.

Use the appropriate version for a specific system: one of UninstallA.exe, UninstallW.exe, or UninstallX64.exe. See the notes at the beginning of this page.

/a Show all registrations, including hidden ones. Without this parameter, only uninstaller registrations that are visible in the Add/Remove Programs control panel are shown.
/c Check and display the uninstall command, but don't run anything. In conjunction with a keyname, this option will display the uninstall command or the quiet uninstall command (see /q option, below) for that uninstall key; without a keyname, the uninstall commands for all registered entries are shown.
/f Show full registration entries instead of a summary. By default, Uninstall will show a one-line summary for each registered uninstaller; with the /f option, Uninstall displays all information available for each registered uninstaller.
/l List the uninstall information for the given keyname registration. By default, this only displays the associated display name and version; if you also specify the /f option, then all uninstall information for keyname is displayed.
/q

Display or run the quiet uninstall command (without user interaction). By default, Uninstall will run or display the interactive uninstaller command for the given keyname; with the /q parameter, the "quiet" command is used instead.

Note: Uninstall will use the registered "quiet" uninstall command if available. If not, then Uninstall will add the appropriate command line option for non-interactive uninstallation to MSI, Tarma, or Inno Setup uninstaller command lines. For other uninstallers, Uninstall will fail if no quiet command is registered.

/w

Wait for uninstaller to terminate. By default, Uninstall starts an uninstaller and then abandons it; with the /w option, Uninstall will wait for the uninstaller process to terminate.

Note: Uninstall only waits for the original uninstaller process to terminate. If the uninstaller starts a secondary process, then this will not be detected by Uninstall.

keyname...

Specifies the uninstaller's registry key name for the application you wish to uninstall. The key name is usually a GUID like {CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}, or sometimes a symbolic name like Microsoft Document Explorer 2008. If the key name contains spaces, it must be "quoted".

You may specify more than one key name; Uninstall will run or display each one in turn.

Remarks

Uninstall lists and checks uninstaller registrations in the following order:

  1. HKEY_CURRENT_USER
  2. HKEY_LOCAL_MACHINE, 64-bit registry (only on 64-bit Windows systems)
  3. HKEY_LOCAL_MACHINE, 32-bit registry

If a particular uninstaller key is registered in more than one place, then only the first available will be found. (You can of course repeat the uninstallation to remove the second and subsequent entries after the first one is uninstalled.)

Even though the uninstaller commands may be visible, uninstallation may fail if the active user account has insufficient privileges for the uninstallation. We therefore recommend that you run Uninstall under an Administrator account if you want to uninstall an application.

Examples

Here are some usage examples; the actual commands are shown in bold type.

Display one-line summaries of all currently registered uninstallers on the system. Each line has the format keyname: DisplayName (version DisplayVersion):

C:\>Uninstall
...
{C27A4272-6AC0-49FD-B82E-B60824FC8B62}: Tarma Installer 5.5.3354 (version 5.5.3354)
{CD590618-36BD-0710-AC86-F3B3C4AF201E}: Microsoft Windows SDK .NET Framework Tools (version 6.1)
{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}: Microsoft .NET Framework 3.5 SP1 (version 3.5.30729)
{DAEEB65B-8B2D-482F-8B02-40470A140275}: MSXML 6 Service Pack 2 (KB954459) (version 6.20.1099.0)
...

Display the uninstallation command lines of all currently registered uninstallers on the system. Each line has the format keyname: UninstallString:

C:\>Uninstall /c
...
{C27A4272-6AC0-49FD-B82E-B60824FC8B62}: C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q0
{CD590618-36BD-0710-AC86-F3B3C4AF201E}:
{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}: MsiExec.exe /I{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}
{DAEEB65B-8B2D-482F-8B02-40470A140275}: MsiExec.exe /I{DAEEB65B-8B2D-482F-8B02-40470A140275}
...

Note that some entries have empty uninstallation commands; these cannot be uninstalled.

Display the quiet uninstallation command lines of all currently registered uninstallers on the system. Each line has the format keyname: QuietUninstallString:

C:\>Uninstall /cq
...
{C27A4272-6AC0-49FD-B82E-B60824FC8B62}: C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q
{CD590618-36BD-0710-AC86-F3B3C4AF201E}:
{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}:
{DAEEB65B-8B2D-482F-8B02-40470A140275}:
...

Note that most entries now have empty uninstallation commands. However, Uninstall recognizes the non-quiet uninstallation commands of MSI installers (see previous example) and will automatically synthesize the required "quiet" uninstall command for these entries, so they can be uninstalled in quiet mode as well.

Display the full uninstallation information of all currently registered uninstallers on the system. Each entry consists of multiple lines: the first line contains the key name; the second and subsequent lines contain the registry information for that key, each indented by a single tab:

C:\>Uninstall /f
...
{C27A4272-6AC0-49FD-B82E-B60824FC8B62}:
	UninstallString=C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q0
	QuietUninstallString=C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q
	ModifyPath=C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /q0
	Version=0x05050D1A (84217114)
	VersionMajor=0x00000005 (5)
	VersionMinor=0x00000005 (5)
	TinFolder=C:\Documents and Settings\All Users\Application Data\Tarma Installer\{C27A4272-6AC0-49FD-B82E-B60824FC8B62}
	TinVersion=5015
	InstallDate=20090314
	InstallLocation=C:\Program Files (x86)\Tarma Installer 5
	InstallSource=D:\Dev\Tin5\Distribution\WebDownload
	DisplayIcon=C:\Documents and Settings\All Users\Application Data\Tarma Installer\{C27A4272-6AC0-49FD-B82E-B60824FC8B62}\Setup.ico
	DisplayName=Tarma Installer 5.5.3354
	DisplayVersion=5.5.3354
	Publisher=Tarma Software Research Pty Ltd
	URLInfoAbout=http://www.tarma.com/
	Contact=support@tarma.com
	URLUpdateInfo=http://www.tarma.com/products/tin5/history.htm
	HelpLink=http://www.tarma.com/support/tin5/index.htm
...

Run the uninstaller for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5. This will be the interactive uninstaller, so the user will have to confirm the uninstallation manually:

C:\>Uninstall {C27A4272-6AC0-49FD-B82E-B60824FC8B62}

Run the "quiet" uninstaller for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5. The uninstallation will proceed immediately, without further confirmation from the user:

C:\>Uninstall /q {C27A4272-6AC0-49FD-B82E-B60824FC8B62}

Same as the previous example, but Uninstall waits until the Tarma uninstaller is finished before exiting. This is useful in batch files, if you want to ensure that the product removal is complete before the next command is executed:

C:\>Uninstall /qw {C27A4272-6AC0-49FD-B82E-B60824FC8B62}

Display (but do not execute) the uninstall command for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5. The output contains only the command line, so you can redirect it and reuse it elsewhere, for example to construct a batch file on the fly:

C:\>Uninstall /c {C27A4272-6AC0-49FD-B82E-B60824FC8B62}
C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q0

Display (but do not execute) the "quiet" uninstall command for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5. The output contains only the command line, so you can redirect it and reuse it elsewhere, for example to construct a batch file on the fly:

C:\>Uninstall /cq {C27A4272-6AC0-49FD-B82E-B60824FC8B62}
C:\DOCUME~1\ALLUSE~1\APPLIC~1\TARMAI~1\{C27A4~1\Setup.exe /remove /q

Display the application name and version for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5. The output contains only that information; it does not include the key name. You can therefore easily redirect it to use elsewhere:

C:\>Uninstall /l {C27A4272-6AC0-49FD-B82E-B60824FC8B62}
Tarma Installer 5.5.3354 (version 5.5.3354)

Display all the registered uninstallation information for key name {C27A4272-6AC0-49FD-B82E-B60824FC8B62}, i.e., Tarma Installer 5:

C:\>Uninstall /lf {C27A4272-6AC0-49FD-B82E-B60824FC8B62}
...output follows, similar to earlier example...