8

I'm using HKEY_LOCAL_MACHINE to set a variable at the time of install. These need to be seen by all users on a machine and are only read by them.

I use Inno to create the entry. It's running as admin, so it should have adequate rights that virtualization doesn't kick in ... or am I misunderstanding?

My application can read the entry (even as a limited user in Win7) BUT I can't see them in RegEdit or RegEditX 3.0. I CAN see them in RegEditX 2.0 though. Weird.

I don't understand why my Delphi app can see the entry, but the RegEdit programs above can't.

I believe that this might have something to so with virtualization (first answer here: Cannot read config data from HKEY_LOCAL_MACHINE on Vista).

But, I can't even see the registry entry in question under HKCU\Software\Classes\VirtualStore\MACHINE\SOFTWARE.

Is HKEY_LOCAL_MACHINE so deprecated that I should be avoiding it completely? How is a developer now supposed to save data for all users - just in {commomappdata}, which usually is C:\Program Data... ??

Community
  • 1
  • 1
RobertFrank
  • 7,332
  • 11
  • 53
  • 99

1 Answers1

24

64-bit versions of Windows emulate 32-bit functionality through the "Windows on Windows" (WoW) subsystem. In the case of the registry, they move the 32-bit keys over to a special subkey for compatibility reasons.

The keys will be in: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node.

This is the registry analogue of the file system redirector that maps system32 to SysWOW64.

More details can be found on the MSDN topic about the Registry Redirector.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Polynomial
  • 27,674
  • 12
  • 80
  • 107
  • Thank you. I thought I was going mad not being able to find some records in the registry that I knew were hiding in there! – Adam Jun 16 '16 at 13:00