【源码】添加启动项到注册表

///<summary>
/// 添加启动项到注册表
///</summary>
void RegAdd()
{
string FullPathFile = Application.ExecutablePath; //获取带全路径的本程序
Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true).SetValue("Fast2011", FullPathFile);//将本程序加入到注册表的RUN中
}

 

posted @ 2011-10-25 18:10  心_远  阅读(244)  评论(0编辑  收藏  举报