I am running 64-bit Windows, and I want to create the registry key HKCU\\Software\\Classes\\Wow6432Node\\CLSID\\{myguid}\\InprocServer32
using C#.
What
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.