Advanced batch command menu

A quick launcher menu built entirely with Windows batch commands — handy for a USB stick or a bare server login where you want one script to bring up your usual tools:

Batch command menu running in a Windows console

Open a new text document, paste the script below, and save it as menu.bat:

@echo off
:menu
cls
echo --- ENTER ONE CHOICE ---
echo O. Exit Batch
echo 1. Wamp Server
echo 2. Adobe Dreamweaver CS3
echo 3. Adobe Photoshop
echo 4. Adobe Illustrator
set /p var=Choice:
IF '%var%' == '0' exit
IF '%var%' == '1' GOTO wamp
IF '%var%' == '2' GOTO dreamweaver
IF '%var%' == '3' GOTO ps
IF '%var%' == '4' GOTO illustrator
echo Entered nothing valid
PAUSE
exit

:wamp
cls
start "" "C:\wamp\wampmanager.exe"
GOTO END

:dreamweaver
cls
start "" "C:\Program Files\Adobe\Adobe Dreamweaver CS3\dreamweaver.exe"
GOTO END

:ps
cls
start "" "C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe"
GOTO END

:illustrator
cls
start "" "C:\Program Files\Adobe\Adobe Illustrator CS3\Support Files\Contents\Windows\Illustrator.exe"
GOTO END

:END
GOTO menu

A few notes from coming back to this script years later:

  • The original used 8.3 short paths like C:\PROGRA~1\... to dodge spaces. Quoted long paths work everywhere modern Windows supports batch, and short-name generation can be disabled per-volume — prefer the quoted form.
  • start with a quoted path needs the empty "" first argument; otherwise start treats the quoted path as the window title and opens a console instead of your program.
  • For a cleaner prompt, choice accepts single keystrokes (no Enter needed), supports arrow-key menus and a timeout via /t, and returns the pick in %errorlevel% — the full set of batch commands is in Microsoft’s Windows commands reference.
  • If you are scripting this much logic today, PowerShell’s Start-Process plus a simple switch on Read-Host is the more maintainable route — but for a zero-dependency .bat, the above still runs unchanged on current Windows.

1 thought on “Advanced batch command menu

Leave a Reply

Your email address will not be published. Required fields are marked *