0

In this link the registry entries for HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall are described, in order to create uninstall entries for an application.

One of my new applications has the concept to either be portable, or to install only for the current user. I can of course create an uninstall shortcut, but I tried to add entries to HKEY_CURRENT_USER\Software...\Uninstall as well.

This worked, Windows shows the uninstall entry in Add/Remove and will run my uninstaller. The question is, is this thing documented? I could only find information about HKEY_LOCAL_MACHINE entries.

Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
  • No, they don't do any bragging about it. The scenario you need to test is install it twice with two user accounts and have one uninstall it again. Does it still work for the second account? Oops. – Hans Passant Jan 25 '20 at 20:19
  • @HansPassant why shouldn't it? its installed in different locations. – Michael Chourdakis Jan 25 '20 at 20:27

1 Answers1

2

TL;DR: The HKCU key seems to be undocumented but works everywhere except Windows 95/98/ME and NT v3.x.

I'm pretty sure no documentation exists but HKCU works on every Windows version you care about (NT 4 and later).

The Uninstall key has never been properly documented. The Add/Remove programs control panel item was added in Windows 95 and only the UninstallString and DisplayName values were documented (nothing else was displayed in the UI, it was a simple listbox but the "Quiet" value had some usage).

Windows 2000 added support for more values but unfortunately the original documentation was also removed around the same time and only the "new" MSI installer and its properties had any kind of documentation (The Windows Logo program required MSI installers at this point in time).

At some point the documentation was made less MSI specific but it still does not document every value nor can I find any official information about HKCU.

It should also be noted that HKCU items are forced to elevate in the Settings app on Windows 10. This bug has been around for a couple of years now.

Anders
  • 97,548
  • 12
  • 110
  • 164