cmd静默运行_【已解决】BAT批处理中如何静默执行,在完成后调用MSGBOX?

论坛 期权论坛 脚本     
已经匿名di用户   2022-7-2 22:16   3694   0

@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

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP