win7系统 VB.Net 修改注册表SOFTWARE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell代码如下:
Dim hklm As RegistryKey = Registry.LocalMachine
Dim software As RegistryKey = hklm.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell", True)
'Dim software As RegistryKey = hklm.OpenSubKey("HARDWARE", True) 这里可以写入
Dim main1 As RegistryKey = software.CreateSubKey("a")
Dim ddd As RegistryKey = main1.CreateSubKey("b")
ddd.SetValue("value", "1234")
ddd.Close()
main1.Close()
software.Close()
hklm.Close() --------------------编程问答-------------------- 调试的时候没有错误,可是注册表里没有写入 --------------------编程问答-------------------- 有知道原因的请加我QQ:441935503 --------------------编程问答-------------------- 管理员权限? --------------------编程问答-------------------- http://topic.csdn.net/u/20070405/12/89F436CF-2439-4844-A9AC-40C674F39C92.html
参考
--------------------编程问答-------------------- 以管理员身份运行VS
补充:.NET技术 , VB.NET