C#操作注册表,在写入注册表值的时候报错
System.UnauthorizedAccessException: 无法写入到注册表项
给OpenSubKey()方法给第2个参数设置为true就可以了,第2个参数为true代表可读可写注册表
RegistryKey hkml = Registry.CurrentUser;
RegistryKey aimdir = hkml.OpenSubKey("Asp Net Settings",true);
黑色头发:http://heisetoufa.iteye.com