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
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
相关文章推荐
- 让你写的c#程序一开机就自动运行 Windows服务实现开机启动
- c#实现程序开机自动运行
- Android实现开机自动运行程序
- Android实现开机自动运行程序
- Android实现开机自动运行程序(转)
- Android实现开机自动运行程序
- linux如何实现开机加载完图形界面后自动运行自己写的一个程序
- [Android实例] Android实现开机自动运行程序
- C# 设置程序开机自动运行/设置&获取程序的安装路径
- 控制Android系统 全屏并且 程序开机自动运行 并且实现程序运行中 开机不锁屏
- [转]C#写的程序如何在开机的时候自动运行
- Android实现开机自动运行程序
- MFC实现程序开机自动运行
- Android实现开机自动运行程序
- Winform开机自动执行程序C#版开机自动运行
- c#开机自动启动程序实现代码
- c#开机自动启动程序实现代码
- Android实现开机自动运行程序
- C#.NET Form设置/取消开机自动运行,判断程序是否已经设置成开机自动启动
- C# 设置程序开机自动运行/设置&获取程序的安装路径