InputBox

A text or password input dialog for batch files

InputBox.exe
Version
1.10.0.17
System
Windows, 32-bit (runs on 64-bit too)
Source
github.com/pedromagician/CMD_InputBox

No installation: unzip anywhere (ideally into a folder on your PATH) and run it from the command line or a batch file.

InputBox

InputBox is a small input dialog for batch files and PowerShell. It shows a message and a field, and prints whatever the user types to the output. No need to build a whole window in Visual Studio for that.

Features

Usage

InputBox.exe -t "Login" -m "Enter your username:"
InputBox.exe -t "Password" -m "Enter password:" -password
InputBox.exe -t "Color Test" -m "Nice colors!" -background #202020 -pen #00FFAA

Store the text in a variable:

@set mytmp=null
@for /f "tokens=*" %%i in ('InputBox.exe -title Title -message "Message..." -default text') do @set mytmp=%%i
@echo %mytmp%

Options

SwitchDescription
-title, -tWindow title.
-message, -mMessage text, supports \n and \u{XXXX}.
-default, -dPre-filled input text.
-password, -passMasks typed characters with *.
-font, -fFont name.
-fontsize, -fsFont size in points.
-lines, -lNumber of lines for the message.
-width, -wWindow width in pixels.
-pen, -pText color (#RRGGBB), default #FFFFFF.
-background, -bBackground color, default #000000.
-brush, -brFill color, default #000000.
-border, -boFrame color, default #000000.
-monitor, -monMonitor: Primary, Mouse, MousePointer or an index (0, 1, 2 …).
-position, -posPlacement: center, top, bottom, left, right, pointer, xy.
-x, -yOffset in pixels.
-topmostKeeps the dialog above other windows.
-iconappApplication icon (ICO or BMP).
-blockThe parent process waits until the dialog closes.
-help, -h, -?Help.