- @echo off
- for /f "delims=" %%A in ('mshta vbscript:Execute("On Error Resume Next:Dim str,fso:str=InputBox(""Message"",""Title"",""Default""):Set fso=CreateObject(""Scripting.FileSystemObject""):fso.GetStandardStream(1).Write str:Set fso=Nothing:close"^)') do (
- echo.用户输入:%%A
- )
- pause
- for /f "delims=" %%A in ('mshta vbscript:Execute("On Error Resume Next:Dim ret,fso:ret=MsgBox(""Message"",vbOKCancel,""Title""):Set fso=CreateObject(""Scripting.FileSystemObject""):fso.GetStandardStream(1).Write ret:Set fso=Nothing:close"^)') do (
- echo.用户选择
- if %%A equ 1 (
- echo 确定
- ) else if %%A equ 2 (
- echo 取消
- )
- )
- pause
- exit /b
复制代码
|