Boite de dialogue sous bat

un petit exe bien utile quand on fait des bat et qu’on souhaite avoir une intervention de l’utilisateur

le programme msgbox.exe peut être téléchargé ici

exemple de code

@echo off
MSGBOX.EXE "This is a sample message.\n\nDo you want to continue ?" "MessageBox Test" YESNOCANCEL
REM MSGBOX.EXE "This is a sample message.\n\nDo you want to continue ?" "MessageBox Test" OKCANCEL
REM MSGBOX.EXE "This is a sample message.\n\nDo you want to continue ?" "MessageBox Test" YESNO
REM MSGBOX.EXE "This is a sample message.\n\nJust click on the button."
eco %errorlevel%
if errorlevel 3 goto NO
if errorlevel 1 goto YES
if errorlevel 2 goto CANCEL
goto fin

:no
echo You don't want to continue.
goto fin
:yes
echo You want to continue.
goto fin
:cancel
echo You don't want to go further.
goto fin
:ok
echo ok
goto fin
:fin
MSGBOX.EXE "You can edit the example.bat to test the syntax."