Reputation: 7394
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... ??
Upvotes: 8
Views: 11531
Reputation: 28316
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.
Upvotes: 24