I am writing some registry entries in my custom installer script, and I wonder what are the implications of including both UninstallString
and QuietUninstallString
.
If both entries are present, how do I control the uninstaller invocation manner (silent mode or non-silent mode) from cmd/PowerShell?
Key UninstallString
is mandatory and contains the command to uninstall the package generally. This key is used if an user uninstalls manually (via Control Panel). Often uninstallers do not run silent or even interact with the user (i.e. they ask questions).
It's a convention that QuietUninstallString
contains a command to uninstall the package silently. A command written to this key should not interact (e.g. ask user). This key is optional.
If your package has a non-interactive uninstall mode (IMHO always a good thing) you should create this additional key.
If your uninstaller always runs silent (why not), you should write the command to both keys.
A script trying to uninstall software silently should check (and run) QuietUninstallString
. If this key is missing chances are low that command line in UninstallString
runs silent.