Windows · 19 8 月, 2021 0

Windows批处理程序(*.bat)隐藏窗口启动

比Shell麻烦一些。需要在你写的脚本前加入如下内容👇

@echo off
    if "%1" == "h" goto begin
    mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
    :begin

这样当你打开*.bat的时候,那个小黑框就只会闪一下然后就消失了。