本帖最后由 chishingchan 于 2024-11-12 21:34 编辑
我整理了一下:- rem 隐藏运行
- if not "%1"=="hide" mshta VBScript:CreateObject("WScript.Shell").Run("""%~f0"" hide",0)(Close)&exit
-
- rem 显示对话框
- for /f "delims=" %%i in (
- 'mshta VBScript:Execute("CreateObject(""Scripting.FilesystemObject"").GetStandardStream(1).Write(MsgBox(""此程序即将删除系统盘的用户数据!是否继续?"",4132,""警告"")):Close"^)'
- ) do set ReturnValue=%%i
-
- if "%ReturnValue%"=="6" set Button=是
- if "%ReturnValue%"=="7" set Button=否
- mshta VBScript:MsgBox("%Button%",0,"返回值")(Close)
-
- rem 播放语音
- if "%ReturnValue%"=="7" mshta VBScript:CreateObject("sapi.spvoice").speak("Goodbye")(Close)&exit
复制代码
|