cmd静默运行_【已解决】BAT批处理中如何静默执行,在完成后调用MSGBOX?
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
start mshta vbscript:msgbox("測試提示框之一? ? ",,"提示")(window.close)
ping 0 /n 3 >nul
taskkill /f /im mshta.exe >nul
start mshta vbscript:msgbox("測試提示框之二(此提示框能保持前端顯示) ",vbSystemModal,"提示")(window.close)
ping 0 /n 6 >nul
taskkill /f /im mshta.exe >nul
start mshta vbscript:msgbox("測試提示框之三? ? ",vbInformation,"提示")(window.close)
ping 0 /n 6 >nul
taskkill /f /im mshta.exe >nul
start mshta vbscript:msgbox("測試提示框之四? ? ",VbExclamation,"警告!")(window.close)
ping 0 /n 6 >nul
taskkill /f /im mshta.exe >nul
start mshta vbscript:msgbox("測試提示框之五? ? ",VbQuestion,"詢問?")(window.close)
ping 0 /n 6 >nul
taskkill /f /im mshta.exe >nul
start mshta vbscript:msgbox("測試提示框之六? ? ",VbCritical,"錯誤!")(window.close)
ping 0 /n 6 >nul
taskkill /f /im mshta.exe >nul
mshta vbscript:CreateObject("Wscript.Shell").popup("測試提示框之七(6秒后自動退出)",6,"提示",vbOKOnly)(window.close)
mshta vbscript:msgbox("測試提示框之八(請點擊任意一個按扭退出)",vbOKCancel,"選擇")(window.close)
mshta vbscript:msgbox("測試提示框之九(請點擊任意一個按扭退出)",vbRetryCancel,"選擇")(window.close)
mshta vbscript:msgbox("測試提示框之十(請點擊任意一個按扭退出)",vbAbortRetryIgnore,"選擇")(window.close)
mshta vbscript:msgbox("測試提示框之十一 (請點擊任意一個按扭退出)",vbYesNo,"選擇")(window.close)
mshta vbscript:msgbox("測試提示框之十二(請點擊任意一個按扭退出)",3,"選擇")(window.close)
msg %username% /time:5 "全部完成,5秒后自動退出!"
exit
總結
以上是生活随笔為你收集整理的cmd静默运行_【已解决】BAT批处理中如何静默执行,在完成后调用MSGBOX?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 启动rocketmq_RocketMQ
- 下一篇: python的模块和类_Python模块