에러레벨 7사이는 "NO"버튼 클릭

에러레벨 6 은 YES "버튼 클릭"

@echo off
call :MsgBox "Which button will you click?"  "VBYesNo+VBQuestion" "Choose any button!!"
if errorlevel 7 (
 echo NO button clicked
 pause
) else if errorlevel 6 (
 echo YES button clicked
 pause
)

exit /b

:MsgBox prompt type title
 setlocal enableextensions
 set "tempFile=%temp%\%~nx0.%random%%random%%random%vbs.tmp"
 >"%tempFile%" echo(WScript.Quit msgBox("%~1",%~2,"%~3") & cscript //nologo //e:vbscript "%tempFile%"
 set "exitCode=%errorlevel%" & del "%tempFile%" >nul 2>nul
 endlocal & exit /b %exitCode%

버튼 배치.bat
0.00MB

+ Recent posts