I'm writing a Wix-based installer that needs to upgrade from older, non-msi-based installations. I'm finding instances of previously installed components by searching directly in the Registry.
To find the uninstaller for a component, I look in
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram
And get the UninstallString
value. This is fine, but I realised that for a 32 bit install on a 64 bit machine, the entry is actually at
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram
Is there anywhere else I ought to be looking?
Eliezer
There's a third entry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall
I've checked this, and these are the only two locations. The second is used to store 32-bit programs on a 64-bit version of Windows. There are no other cases that need checking.
来源:https://stackoverflow.com/questions/10122761/where-are-all-possible-locations-of-uninstallstring-registry-entries