Uninstall a program with the registry or PowerShell
Every installed program registers an uninstall command in the registry. When Settings → Apps cannot remove a program, or when you need to remove it silently, that command is the way.
Where Windows keeps the uninstall commands
Programs installed for all users are under HKLM, 32-bit programs on 64-bit Windows under WOW6432Node, and programs installed only for you under HKCU. Each program has a subkey with DisplayName, DisplayVersion, UninstallString and often QuietUninstallString.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\UninstallHKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\UninstallHKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UninstallList installed programs with PowerShell
This reads all three locations and shows the name, version and uninstall commands.
$keys = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"Get-ItemProperty $keys | Where-Object DisplayName | Select-Object DisplayName, DisplayVersion, UninstallString, QuietUninstallString | Sort-Object DisplayNameRun the uninstall command
QuietUninstallString, when present, removes the program without questions. Otherwise run UninstallString and add the silent switch of the installer type (/S for NSIS, /VERYSILENT for Inno Setup). For MSI packages the subkey name is the ProductCode, and msiexec /x removes it.
msiexec /x {PRODUCT-CODE-GUID} /qn /norestart"C:\Program Files\App\uninstall.exe" /SOr let winget do it
winget finds programs in the same registry keys, including those it did not install, and runs their uninstaller.
winget listwinget uninstall --name "App Name"When the uninstaller is missing
If the uninstaller file was deleted, reinstalling the same version first usually repairs it, after which it can be removed normally. Delete a registry entry by hand only when the program’s files are already gone, and export the key before deleting it.
Frequently asked questions
Why does a program not appear in Settings → Apps?
Settings lists only entries with a DisplayName that are not marked as system components. Portable programs never register anything and are removed by deleting their folder.
What is the ProductCode of an MSI?
A GUID that identifies one MSI package. It is the name of the program’s subkey under …\Uninstall and is shown on the silent install page of each MSI app on ExeAtlas.