C#如何实现程序开机自动运行?
展开全部
那还不容易!using system .microsoft.win32;//一定要引用
RegistryKey rk = Registry.LocalMachine;
RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rk2.SetValue( "autorun",这写程序路径);
rk2.Close();
rk.Close();
RegistryKey rk = Registry.LocalMachine;
RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rk2.SetValue( "autorun",这写程序路径);
rk2.Close();
rk.Close();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询