注册表32位64位键值区别

32-bit and 64-bit Application Data in the Registry

 

On 64-bit Windows, portions of the registry entries are stored separately for 32-bit application and 64-bit applications and mapped into separate logical registry views using the registry redirector and registry reflection, because the 64-bit version of an application may use different registry keys and values than the 32-bit version. There are also shared registry keys that are not redirected or reflected.

The parent of each 64-bit registry node is the Image-Specific Node or ISN. The registry redirector transparently directs an application's registry access to the appropriate ISN subnode. Redirection subnodes in the registry tree are created automatically by the WOW64 component using the name Wow6432Node. As a result, it is essential not to name any registry key you create Wow6432Node.

The KEY_WOW64_64KEY and KEY_WOW64_32KEY flags enable explicit access to the 64-bit registry view and the 32-bit view, respectively. For more information, see Accessing an Alternate Registry View.

To disable and enable registry reflection for a particular key, use the RegDisableReflectionKey andRegEnableReflectionKey functions. Applications should disable reflection only for the registry keys that they create and not attempt to disable reflection for the predefined keys such as HKEY_LOCAL_MACHINE orHKEY_CURRENT_USER. To determine which keys are on the reflection list, use the RegQueryReflectionKeyfunction.

参考

http://windowsitpro.com/systems-management/whats-wow6432node-under-hkeylocalmachinesoftware-registry-subkey

http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms724072(v=vs.85).aspx

http://msdn.microsoft.com/zh-cn/library/windows/desktop/aa384253(v=vs.85).aspx

解决方法 加上参数 RegistryView.Registry64

RegistryKey regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, ClientIP, RegistryView.Registry64).OpenSubKey(path);

  

原文地址:https://www.cnblogs.com/sherlock99/p/4087507.html