Messagebox is a tiny portable tool for displaying messages and questions from batch files or scripts.
The program can be used just to show a warning ("xyz will happen next"), or to ask a question and return the result as an ErrorLevel.
The syntax looks like this:
messagebox message title [type]
The most interesting element is the optional "type", which defines the icon displayed, the buttons used, and which button is the default.
To set it up, you would find the settings you need and add up those values.
rem Default button.
rem Other options.
rem Result ERRORLEVELs.
For example, using Retry and Cancel buttons gives us a value of 5; setting Retry as the default is a value of 4; an exclamation mark icon is 48. That's a total of 57, and we'd use it in a line like this:
messagebox "We've failed to do something important", "Horrible Error", 57
Checking ErrorLevel in the batch file would then give us 4 if the user selected Retry, 2 for Cancel.
There are plenty of tools around to display messages from scripts, but Messagebox has several advantages: it has no dependencies, runs on anything from Windows NT 4.0 up, is free for all purposes, and gives you the power to use whatever combination of (standard) buttons and icons you need.