ABCD
ABCD

Reputation: 907

What's the purpose of UnistallString in the registry

Does anyone know the purpose of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{xxxx}-->UninstallString in the registry?

I had the impression that Add/Remove Program uses it to uninstall any application by using MsiExec. But that's not the case, Add/Remove programs doesn't use it. Is there any other registry value similar to this that is using by Add/Remove programs?

Upvotes: 1

Views: 302

Answers (2)

Michael Urman
Michael Urman

Reputation: 15905

Windows Installer packages are a special case that is ignored. For all other package types, the UninstallString is the command used to perform an uninstall. For the Windows Installer package, the default command will uninstall the MSI package, but is presumably only for backwards compatibility of other applications that read the Uninstall key, as Add/Remove Programs ignores it. See Custom uninstaller for a WIX generated MSI for some background on workarounds.

Upvotes: 5

Andrew Sklyarevsky
Andrew Sklyarevsky

Reputation: 2135

According to MSDN (plus an another more modern article), these registry keys are used exactly for the purposes of the Add/Remove Programs feature.

Upvotes: 0

Related Questions