您的位置:首页 > 其它

使用 Microsoft.Win32.RegistryKey读写注册表

2016-12-03 15:07 106 查看

使用 Microsoft.Win32.RegistryKey读写注册表

//添加当前程序为开机启动项
string path = Application.ExecutablePath;
Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;
Microsoft.Win32.RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rk2.SetValue("JcShutdown", path);
rk2.Close();
rk.Close();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  注册表读写