A lightweight command-line tool for displaying Windows message boxes with customizable icons, buttons, and timeout options. Perfect for batch scripts, automation, and system administration tasks.
- 🖼️ Multiple icon styles (Error, Warning, Information, Question)
- 🔘 Various button combinations (OK, OK/Cancel, Yes/No, etc.)
- ⏱️ Configurable timeout
- 🎨 Colored console output
- 💻 Windows 7/8/8.1/10/11 compatible
- 📦 Single executable, no dependencies
A precompiled binary (messagebox.exe) is available in the sources page. Simply download and use it!
- GCC compiler (MinGW or similar)
- Windows SDK
gcc -s -Os -o messagebox.exe messagebox.c -luser32 -lkernel32messagebox.exe "message" "title" ICON_TYPE BUTTON_TYPE [timeout]message: Text to display in the message boxtitle: Window titleICON_TYPE: One of ERROR, WARNING, INFORMATION, QUESTIONBUTTON_TYPE: One of OK, OKCANCEL, RETRYCANCEL, YESNO, YESNOCANCELtimeout: (Optional) Timeout in seconds (default: 15)
# Simple information message
messagebox.exe "Hello World!" "Greetings" INFORMATION OK
# Confirmation dialog with 10-second timeout
messagebox.exe "Delete this file?" "Confirm" QUESTION YESNOCANCEL 10
# Error message
messagebox.exe "Failed to save file!" "Error" ERROR OK
# Warning with retry option
messagebox.exe "Connection lost. Retry?" "Warning" WARNING RETRYCANCELThe program outputs one of the following:
- OK
- Cancel
- Yes
- No
- Retry
- Timeout
- Batch script user interactions
- System administration tasks
- Automated testing
- User notifications
- Confirmation dialogs
The project is licensed under the terms of the MIT License.
Zig Zag
- Windows API documentation
- Open source community