C#访问注册表

注册表

要访问注册表,就可以使用Registry和RegistryKey。

         


7


 
 

 



 
 

1

//创建注册表
2
RegistryKey RegistryKey = Registry.LocalMachine;
3
RegistryKey.CreateSubKey(@"SOFTWARE\WOW6432Node\DDSoftware");
4
//设置值
5
Registry.SetValue(RegistryKey+ @"\SOFTWARE\WOW6432Node\DDSoftware", "DDIMP","123");
6
//读取注册表
7
object AS = Registry.GetValue(RegistryKey + @"\SOFTWARE\WOW6432Node\DDSoftware", "DDIMP", "0");
     
上一篇:Linux文件查找工具之find “大宝剑”--转载


下一篇:npm install报错情况 cb() never called! 的确完美解决