C#修改注册表,为什么到CURRENT VERSION就读不了了。
我尝试通过C#修改注册表,RegistryKey rk = Registry.CurrentUser;
RegistryKey software = rk.OpenSubKey("software");
RegistryKey microsoft = software.OpenSubKey("microsoft");
RegistryKey windows = software.OpenSubKey(@"windows", true);
//RegistryKey currentversion = windows.OpenSubKey(@"shell", true);
//RegistryKey explorer = currentversion.OpenSubKey("explorer");
//RegistryKey shell = explorer.OpenSubKey(@"shell folders", true);
//RegistryKey key = cachemover.CreateSubKey("swort");
windows.SetValue("swort", "test");
一层一层抓下来,抓currentUser/sowftware/microsoft/windows 都OK
但是再下面就抓不了,一抓就报错,更别说修改,新建了。
哪位碰到过类似的问题?
补充:.NET技术 , C#