1.在jar包目录新建一个start.bat 文件,然后写入启动命令
java -jar XXXX.jar
2.仍然在此目录,新建start.vbs 文件,然后写入一下命令,命令最后一个0是隐藏窗口运行
createobject("wscript.shell").run"D:\start.bat",0
3.创建run.vbs的快捷方式,移动到开机自启动目录下:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
测试:
参考:https://blog.csdn.net/weixin_46724181/article/details/122598733
标签:bat,run,Windows,jar,vbs,start From: https://www.cnblogs.com/2008nmj/p/16788011.html