怎么让一个用C#写的程序,开机时自动运行
2个回答
展开全部
将你编译好的exe文件放到startup中,一下是startup文件位置
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
//------------------------------------------------------------------------------------------------
【注册表】
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\User Shell Folders]
\ "Common Startup\ "=\ "%Directory%\ "
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\Shell Folders]
\ "Common Startup\ "=\ "%Directory%\ "
//------------------------------------------------------------------------------------------------
C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
//------------------------------------------------------------------------------------------------
【注册表】
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
Startup=\ "%Directory%\ "
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
Startup=\ "%Directory%\ "
//------------------------------------------------------------------------------------------------
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
//------------------------------------------------------------------------------------------------
【注册表】
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\User Shell Folders]
\ "Common Startup\ "=\ "%Directory%\ "
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\Shell Folders]
\ "Common Startup\ "=\ "%Directory%\ "
//------------------------------------------------------------------------------------------------
C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
//------------------------------------------------------------------------------------------------
【注册表】
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
Startup=\ "%Directory%\ "
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
Startup=\ "%Directory%\ "
//------------------------------------------------------------------------------------------------
展开全部
C#/WPF程序实现软件开机自动启动的两种常用方法 - CSDN博客 https://blog.csdn.net/liyu3519/article/details/81257839
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询