MBox Version 1.0 by Anthony Anderberg ant@anderbergfamily.net MBox displays a Windows(tm) message box in accordance with command-line input and returns an error code based on which button user pushes. It can be useful when creating batch files needing user input in a Windows-based environment. Usage: mbox.exe Button_Type Message_Text [Title_Bar_Text] [Icon] The Button_Type and Message_Text fields are required, the Title_Bar_Text and Icon are optional but if both are specified the Title_Bar_Text must be first. As you might expect any text field with spaces must be surrounded with double quotes. Button_Type Displayed Buttons OK OK OKCAN OK Cancel YN Yes No YNC Yes No Cancel RC Retry Cancel ARI Abort Retry Ignore Icons Meanings WARN Warning INFO Information QUEST Question STOP Stop Return Codes: The following return codes are used to indicate which button the user selected. A return code of zero indicates that the program was unable to create the message box. 1 = OK 2 = Cancel 3 = Abort 4 = Retry 5 = Ignore 6 = Yes 7 = No Examples: mbox.exe OKCAN "Continue with install?" "MyApp Installer" QUEST mbox.exe RC "Files not updated." "Update Script" STOP mbox.exe YESNO "Reboot System?" MyApp mbox.exe OK "Go Vikings!" Your batch file might look something like this: @echo off mbox.exe OKCAN "Continue with install?" QUEST if %errorlevel% == 1 goto continue if %errorlevel% == 2 goto end echo Unexpected return value, abort. goto end :continue echo Install commands go here. :end Programming Notes: Anyone familiar with Windows programming will quickly realize that the Windows MessageBox API code is doing most of the work here. But then again its a computer, its suppose to be doing the hard work for us... Legal Mumbo-Jumbo: Feel free to download, use, and distribute this software as you wish so long as this document is included, both are unchanged, and no fee is charged. This software has been tested, but I am not responsible for anything that occurs to your computer. Use at your own risk, yada, yada, yada.