C# WOW6432无法从64位注册表视图访问节点子项
我正在编写一个遍历注册表的程序。当遇到C# WOW6432无法从64位注册表视图访问节点子项,c#,.net,registry,regedit,C#,.net,Registry,Regedit,我正在编写一个遍历注册表的程序。当遇到HKEY\U CLASSES\U ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node-键时,程序停止,因为 var openedKey = key.OpenSubKey(/* any name of the present (!) subkeys*/); // where "key" is "HKEY_CLASSES_ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node" 产
HKEY\U CLASSES\U ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node
-键时,程序停止,因为
var openedKey = key.OpenSubKey(/* any name of the present (!) subkeys*/);
// where "key" is "HKEY_CLASSES_ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node"
产生null
因此,我尝试使用regedit.exe
和reg.exe
查找此键,结果是使用此方法确实可以看到子键。此外,
key.GetSubKeyNames()
返回与名称完全相同的值
我尝试编译64位和32位CPU,并将RegistryView.Registry32
和RegistryView.Registry64
传递给第一个CPU
RegistryKey.OpenBaseKey(hive, view)
打电话。
这并没有解决问题
为什么返回的密钥
null
?避免HKCR,它是假的。请改用HKCU\Software\Classes\VirtualStore。@HansPassant“假”是什么意思?是什么让这把钥匙“假”呢?避开HKCR,它是假的。请改用HKCU\Software\Classes\VirtualStore。@HansPassant“假”是什么意思?是什么让这把钥匙“假”呢?