C sharp创造了Registery并为其设定了价值 [英] C sharp create Registery and set value to it
本文介绍了C sharp创造了Registery并为其设定了价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个代码来在注册表中提交值
但是不起作用:/
I am writing a code to submit values in registry
but is not working :/
RegistryKey key = Registry.LocalMachine.OpenSubKey("Software", true);
key.CreateSubKey("Registration");
key = key.OpenSubKey("Registration", true);
key.CreateSubKey("AppVersion");
key = key.OpenSubKey("AppVersion", true);
key.SetValue("Registerd", "yes");
MessageBox.Show("created");
请你解决这个问题...... ???
thanx
Could u please sort out this...???
thanx
推荐答案
const string keyName = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Registration";
Registry.SetValue(keyName,"Registration","True")
Registry.SetValue(keyName,"AppVersion","True")
Registry.SetValue(keyName,"Registered","yes")
我整理出来, ,
注册表中存在32位和64位应用程序数据
转到Softwares目录下的Wow6432Node并查看此处:)
I sort out it ,,,
there exists 32-bit and 64-bit Application Data in the Registry
Go to Wow6432Node under Softwares directory and check out here :)
这篇关于C sharp创造了Registery并为其设定了价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文