注册表未更新 [英] Registry is not updating
本文介绍了注册表未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
RegistryKey autoStartOnConnKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true);
autoStartOnConnKey.SetValue(@"Shell", @"notepad.exe", RegistryValueKind.String);
MessageBox.show("done");
以上代码工作正常,但我的注册表中没有任何更新。
i想要用值notepad.exe更新shell
谢谢。
above code is working fine but there is nothing update in my registry.
i want to update shell with value notepad.exe
thanks .
推荐答案
你好,
试试这个链接
参考:使用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() + "\"");
这篇关于注册表未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文