Registry redirection on 64-bit Windows

前端 未结 4 998
暗喜
暗喜 2021-01-20 16:47

I am running 64-bit Windows, and I want to create the registry key HKCU\\Software\\Classes\\Wow6432Node\\CLSID\\{myguid}\\InprocServer32 using C#.

What

4条回答
  •  广开言路
    2021-01-20 17:16

    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. It will automatically redirect 32-bit registry operations to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. More details can be found on the MSDN topic about the Registry Redirector.

    You can use the RegistryView enum on RegistryKey.OpenBaseKey to open the 32-bit view explicitly and access HKCU\Software\Classes\CLSID{myguid}\InprocServer32 directly. This will automatically access the WOW64 node on 64-bit systems and the normal key on 32-bit systems.

提交回复
热议问题