This project has moved and is read-only. For the latest updates, please go here.

Note to developers

In case you are an developer and would like OverlayMessageBox in your application, check here. If you want to use the executable directly, read on.

Two different executables

OverlayMessageBox (OMB) comes with two different executable:


OverlayMessageBoxCmd.exe is intent for use in batch files, scripts etc. that are already displaying a command prompt window.

OverlayMessageBoxUI.exe is intent if you want to call it from a Windows application or any other executable and you want to avoid showing a command prompt window.

Except the different behavior of creating a command prompt window, both versions behave the same.

Copying the files

Copy all files from the download of the current release (see Downloads) to a folder. You need the following files to execute it:
  • CommandLine.dll
  • OverlayMessageBox.dll

Depending on the version you wish to use either
  • OverlayMessageBoxCmd.exe
  • OverlayMessageBoxUI.exe
  • OverlayMessageBoxUI.exe.config

Using OverlayMessageBox

The most basic example is that you only display a message with this command:

OverlayMessageBoxCmd.exe --text "My text"


For more control, you can specify the title, the caption and a different symbol:

OverlayMessageBoxCmd.exe --caption "Title" --text "My text" --symbol Warning


OverlayMessageBox can also use the new “Task Dialog” style message box which looks a little bit modern. In order to use it, specify the “headline” parameter and make sure you are using Windows Vista or better (when running on XP, headline is ignored and a normal message box is used).

OverlayMessageBoxCmd.exe --caption "Title" --headline "The headline" --text "My text" --symbol Warning

This will create the following message when using Vista or better:


Note When using “Task Dialog” with “--symbol Question”, please see issue 1: Cannot resolve work item macro, invalid id.

You can also define which buttons are displayed and determine which button was selected by checking the return code.

 OverlayMessageBoxCmd.exe --caption "Title" --headline "The headline" --text "My text" --symbol Warning --buttonset YesNo 

IF "%RETCODE%"=="104" goto YES
IF "%RETCODE%"=="105" goto NO


Each button has a different return code. To see the full list, use OverlayMessageBoxCmd.exe -?

If you wish to split your text among multiple lines, you can use \n to insert line breaks.

OverlayMessageBoxCmd.exe --caption "Title" --text "My text\nLine 2\nLine 3\n\nLine 5" --symbol Warning


More examples

The download file (see Downloads) contains a folder examples that has ready-to-use batch files you might find useful.

Have fun!
-- TeX HeX

Last edited Feb 21, 2012 at 7:54 PM by TeXHeX, version 17


No comments yet.