在Wow6432Node中写入注册表值而不进行重定向 [英] Write the registry value without redirect in Wow6432Node

查看:92
本文介绍了在Wow6432Node中写入注册表值而不进行重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码插入注册表值

Microsoft.Win32.RegistryKey key;
            key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION"); 
            key.SetValue("MyBrowser.exe", 8000);
            textBox1.Text = key.GetValue("MyBrowser.exe").ToString(); 
            key.Close();

在Windows中32位工作,但在64位中插入到wow6432node如何禁用重定向?

in windows 32 bit work, but in 64 bit is inserted to wow6432node how to disable the redirect?

推荐答案

您需要使用 OpenBaseKey 方法中进行指定'需要稍微调整一下代码.

You need to open the key using RegistryView.Registry64. You specify this in the OpenBaseKey method so you'll need to rejig your code a little.

这篇关于在Wow6432Node中写入注册表值而不进行重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆