3
votes

I know how to create a MsgBox with .vbs and how to start them with a batch file.

How do I write a conditional in the batch file, such that the flow of execution will depend on which MsgBox button the user clicks?

1
Did you mean hitting cancel on the MSGBOX ? Can you post your code ? - Hackoo
Maybe this can help - MC ND

1 Answers

2
votes

Test.vbs :

msgbox("Question",vbyesno,"Title")

Test.bat :

for /f "tokens=*" %%a in ('cscript //nologo test.vbs') do (
set results=%%a
)

if "%results%"=="6" (echo do something) else (echo do another thing)
pause