更新时间:2022-11-01 13:10:17
你好,
试试这个链接
参考:使用C#从注册表中读取,写入和删除
谢谢
Hello ,
Try this link
Refer:Read, write and delete from registry with C#
thanks
http://msdn.microsoft.com/en-us/library/microsoft.win32 .registrykey.close(v = vs.110).aspx [ ^ ]
关闭密钥并将其刷新到dis k如果其内容已被修改。
Alan。
http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.close(v=vs.110).aspx[^]
Closes the key and flushes it to disk if its contents have been modified.
Alan.
RegistryKey add = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
add.SetValue("nameprogram", "\"" + Application.ExecutablePath.ToString() + "\"");