Repository navigation
Coming From swiftDialog
If you already write swiftDialog into Munki or Jamf workflows, the mental model transfers whole: build a dialog from flags, keep it alive, drive it from a command file, read the exit code. What differs is scope. csharpDialog implements the progress-reporting core and leaves swiftDialog's interactive and presentational surface out.
Read this page for what maps, then CLI Reference for the exact behaviour of each csharpDialog flag.
A window is not the default. swiftDialog always draws. dialog.exe only uses the WPF
front end when it sees --window, --fullscreen, --kiosk, --firstrun, --autolaunch
or --commandfile; otherwise it prints a menu to stdout and blocks on Console.ReadLine().
A swiftDialog line transliterated verbatim will hang a non-interactive script. Add
--window.
Exit codes are 0 or 1 only. swiftDialog's 2 (button2), 4 (timeout), 10 (quit key) and
20 (--infobutton) do not exist. Button pressed is 0; timeout, quit key and error are all
- Any workflow that branches on 2 or 4 needs restructuring.
Only one button is ever displayed. --button2 is parsed and stored but the window has
a single button control. Two-way decisions have to be built another way.
| swiftDialog | csharpDialog | Notes |
|---|---|---|
--title, -t
|
--title, -t
|
Same |
--message, -m
|
--message, -m
|
Plain text only — see markdown, below |
--button1text |
--button1text / --button1
|
Same |
--button1disabled |
--button1disabled |
Also engages a close lock: title-bar X and Alt+F4 are refused while disabled |
--quitkey |
--quitkey |
Ctrl+char instead of Cmd+char. Only the first character is used; letters and digits only |
--hidedefaultkeyboardaction |
--hidedefaultkeyboardaction |
Swallows Esc, Enter and Alt+F4 |
--timeout |
--timeout |
Seconds. Closes the window; exit code is 1, not swiftDialog's 4 |
--width / --height
|
--width / --height
|
Pixels. No percentage form |
--commandfile |
--commandfile |
Same idea, mostly the same verbs |
--listitem |
--listitem |
The comma-separated title,status,icon form. No key/value form on the command line |
--progress |
--progress |
With no value it simply shows the bar, which is the usual use |
--progresstext |
--progresstext |
Initial value is not applied by dialog.exe; send it over the command file |
| swiftDialog | csharpDialog | Difference |
|---|---|---|
--blurscreen |
--fullscreen |
Full-virtual-desktop overlay with a dimmed, DWM-blurred backdrop and the dialog centred on it. Acrylic needs Windows 11 22H2+; older builds get a plain dim |
--ontop |
--topmost |
Parsed but inert in dialog.exe. Use --fullscreen, whose overlay is always topmost |
--position |
— | No equivalent. The window is always centred |
--progress <max> |
--progress-max |
csharpDialog's --progress <n> is the value, not the maximum. --progress-max exists but is inert — the bar's maximum is fixed at 100, so always send percentages |
--icon |
--icon |
Parsed but inert in dialog.exe; the header graphic is a built-in vector. List-item icons via the third --listitem field do work, from a local absolute path |
--iconsize |
— | No equivalent |
--big, --small, --mini
|
--width / --height
|
No named size presets |
Everything in this list is absent from the parser. Passing it is silently ignored.
| swiftDialog area | Flags with no csharpDialog counterpart |
|---|---|
| Form controls |
--textfield, --checkbox, --selecttitle/--selectvalues, --selectdefault, --fileselect
|
| Structured input |
--jsonstring, --jsonfile, --jsonoutput
|
| Chrome and layout |
--infobox, --infotext, --infobuttontext, --infobuttonaction, --titlefont, --messagefont, --alignment, --centreicon, --overlayicon, --bannerimage, --bannertitle, --helpmessage
|
| Content views |
--webcontent, --video/--videocaption (the flag is parsed but no playback exists), --image/--imagecaption (parsed, inert), --listitem icon URLs |
| Modes |
--notification, --mini, --presentation, --displaylog
|
| Behaviour |
--moveable, --ontop (as a working flag), --hidetimerbar, --quitoninfo, --blurscreen opacity control, --autoplay
|
| Output | Result JSON on stdout, per-field values, --jsonoutput
|
| Text | Markdown in --message. --markdown is parsed but read by nothing; the message renders as plain text |
| swiftDialog command | csharpDialog | Status |
|---|---|---|
title: |
title: |
Works |
message: |
message: |
Works. No markdown |
progress: |
progress: |
Works. Percentage — the maximum is fixed at 100 |
progresstext: |
progresstext: |
Works |
button1text: |
button1text: |
Works |
button1: enable / disable
|
same | Works, and enabling also releases the close lock |
listitem: add, title: … |
same | Works |
listitem: index: N, status: … |
same | Works |
listitem: delete, … |
— | Parsed, does nothing. Rows cannot be removed |
list: clear |
— | Parsed, does nothing |
quit: |
quit |
Works. Exits 0 |
progress: increment |
progressincrement: |
Accepted by the parser, no window handler. Track the value in your script |
progress: reset |
progressreset |
Same — send progress: 0
|
icon:, image:, overlayicon:, infobox:, infotext:, width:, height:, position:, activate:, alignment:, button2text:
|
— | Either absent or accepted-and-ignored |
The verbs accepted-but-ignored are enumerated in Command File Reference.
| swiftDialog on macOS | csharpDialog on Windows |
|---|---|
Munki managedsoftwareupdate
|
Cimian managedsoftwareupdate.exe
|
/Library/Application Support/Dialog/dialog.log as the default command file |
No default. --commandfile is required and takes an explicit path |
Munki icon cache under Managed Installs/icons
|
%ProgramData%\ManagedInstalls\icons\, checked first when resolving an icon by basename |
| Launching from a LaunchAgent in the user's session | A scheduled task or logon script in the user's session. A SYSTEM-context launch lands in session 0 and is invisible — see Troubleshooting |
| Dark mode from the system appearance setting | Dark mode from AppsUseLightTheme in HKCU, with a DWM immersive dark title bar |
dialog binary in /usr/local/bin
|
dialog.exe in C:\Program Files\csharpDialog, added to the machine PATH by the installer |
A typical Munki-side swiftDialog invocation:
dialog --title "Setting up your Mac" \
--message "Please wait while we install your software." \
--progress --progresstext "Starting..." \
--button1disabled \
--blurscreen \
--commandfile /var/tmp/dialog.logThe csharpDialog equivalent. Note the added front-end flag is unnecessary here only because
--fullscreen and --commandfile both imply it, and that the initial progress text moves
into the command file because the launch-time value is not applied:
dialog --title "Setting up this computer" `
--message "Please wait while we install your software." `
--progress `
--button1disabled `
--hidedefaultkeyboardaction `
--fullscreen `
--commandfile "C:\ProgramData\ManagedNotifications\work\dialog.txt"Add-Content "C:\ProgramData\ManagedNotifications\work\dialog.txt" "progresstext: Starting..." -Encoding UTF8--hidedefaultkeyboardaction is added because on Windows, Alt+F4 and Esc are live
dismissal paths that a disabled button alone does not cover.
The repository's roadmap lists markdown, form elements, sound, JSON configuration files and a PowerShell module as unimplemented. The JSON model and the theming layer are partly written but not reachable — see Configuration. Do not design a workflow around them until they are wired up.
csharpDialog — MIT licensed — windowsadmins/csharpdialog
Reference
Guides
Internals
Help