隐藏CMD窗口,使程序在后台执行
时间:2023-09-30 阅读:157
@echo off if “%1″==”h” goto begin start mshta vbscript:createobject(“wscript.shell”).run(“””%~nx0″” h”,0)(window.close)&&exit :begin
代码放在此处即可
例如我要将jupyter后台运行并设置开机启动可以这样操作:
@echo off cd: c:\Users\admin\appdata\microsoft\windows\start menu\programs\startup if “%1″==”h” goto begin start mshta vbscript:createobject(“wscript.shell”).run(“””%~nx0″” h”,0)(window.close)&&exit :begin d: cd d:\python\scripts\ d:\python\scripts\jupyter.exe notebook
设置开机启动
win + R 输入以下代码
shell:startup
网友评论