1.

Solve : DOS batch file - Display popup message with two choices?

Answer»

Using a DOS batch file I'd like to display a popup window in XP and Windows 7 where I display a message and give the user the choice to press one of two buttons - one would stop the DOS batch file, while the other button would allow it to CONTINUE. Any hint on what dos batch command/pgm I may use?Windows command language does not have popup windows with buttons but you can use a batch/Visual Basic Script hybrid to do this.

CODE: [Select]@echo off
echo wscript.quit MsgBox ("Continue?", 4, "Please choose") > yesno.vbs
wscript //nologo yesno.vbs
set value=%errorlevel%
del yesno.vbs
if "%value%"=="6" echo You CLICKED yes
if "%value%"=="7" echo You clicked no

This WORKS great! Thanks so much!



Discussion

No Comment Found