您的位置:首页 > 编程语言 > C#

c#实现程序开机自动运行(转)

2010-10-13 14:33 351 查看
代码如下:
RegistryKey KeyCon=Registry.LocalMachine.OpenSubKey( "Software\\Microsoft\\Windows\\CurrentVersion\\Run",true); string MyKey= "Terminal"; if((string)KeyCon.GetValue(MyKey,"no") == "no")//指定的键不存在 { string Path = Application.StartupPath+@"\Terminal.exe"; KeyCon.SetValue(MyKey,Path); //设置注册表中的启动键 }
原文地址:/article/5925985.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: