Hide the batch itself after the windows bat script batch is executed

@echo off
if "%1"=="h" goto begin
start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
::以下为正常批处理命令,不可含有pause set/p等交互命令

For example, a script I wrote today to start the program with one key on boot

@echo off
if "%1"=="h" goto begin
start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
start/d "C:\Program Files (x86)\software\WeChat" WeChat.exe 
start/d "C:\Program Files (x86)\software\WXWork" WXWork.exe
start/d "C:\Program Files (x86)\software\DingDing" DingtalkLauncher.exe
start/d "C:\Program Files (x86)\software\Dict" YoudaoDict.exe
start/d "C:\Program Files (x86)\software\Netease\MailMaster" Application\mailmaster.exe
start/d "C:\Program Files (x86)\software\TIM\Bin" QQScLauncher.exe
start/d "C:\Program Files (x86)\software\Everything" Everything.exe
exit

Guess you like

Origin blog.csdn.net/weixin_44578029/article/details/111319831