有没有哪位有C#或VB.NET的32位程序读写win7 64位注册表的可用的例子?

现在怎么测试都不能读写64位注册表,要么出错,要么读写不了,里面没有对应的键值

try
{
if (int.Parse(Distinguish64or32System()) == 0x40)
{
Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Wow6432Node", true).OpenSubKey("Microsoft", true).OpenSubKey("Internet Explorer", true).OpenSubKey("MAIN", true).CreateSubKey("FeatureControl").CreateSubKey("FEATURE_BROWSER_EMULATION").SetValue("BOCIES.exe", 0x1f40);
}
else
{
Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Microsoft", true).OpenSubKey("Internet Explorer", true).OpenSubKey("MAIN", true).CreateSubKey("FeatureControl").CreateSubKey("FEATURE_BROWSER_EMULATION").SetValue("BOCIES.exe", 0x1f40);
}
}
catch (Exception exception)
{
GobleExceptionMsgLog.AddText(exception.Message);
}
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答