Reading keys from a virtualized Windows registry

My earlier application writes to the registry (which ends with virtualization), now I want the installer to really read this data when I tried directly from LOCAL_MACHINE (I did not know that the key was virtualized), I got an error, then when I decided to try read directly from the virtualized key, I also got an error.

Windows 2008 Server is 64 bits and my application is 32 bits, UAC is on.

So, is it really possible to read directly from a virtualized Windows registry?

Now I need to read this data, BUT.

This does not work.

  if regkeyexists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Company\App') then
  begin
    msgBox('Exists', mbinformation, mb_ok);
  end else begin
    msgBox('Doesnt exists', mbinformation, mb_ok);
  end;

And that also does not work.

  if regkeyexists(HKEY_CURRENT_USER, 'Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Company\App') then
  begin
    msgBox('Exists', mbinformation, mb_ok);
  end else begin
    msgBox('Doesnt exists', mbinformation, mb_ok);
  end;

It says the key does not exist

So now I can not read the data? I checked and the path is ok.

+4
2

, , , - .

, -, Windows 2008 UAC ( ) , Inno Setup true LOCAL_MACHINE, .

, , LOCAL_MACHINE, , "ShellExecAsOriginalUser", , LOCAL_MACHINE Inno Setup.

!

+2

- ; , , , (, , , ).

, , , . , , .

, . , HKLM. ( , ):

  • HKCU\Software\YourCompany\YourApp\SettingName
  • VirtualStore HKLM,
  • HKLM,

, # 1, . , - , HKCU, , HKLM.

+3

All Articles