Skip to content

Command Line Reference

Rod Christiansen edited this page Oct 8, 2026 · 4 revisions

Command Line Reference

The command-line tool is managedbootstrapinstall.exe, installed to C:\Program Files\BootstrapMate and added to the system PATH. This page lists every switch it accepts, what the process returns, and the invocations you are likely to need.

How arguments are handled

The executable's application manifest requests asInvoker, so it starts with whatever token the caller has. Three read-only switches are handled first, from any position in the argument list, before elevation, logging or the single-instance lock:

  1. --last-run prints the last run's one-line summary and exits 0.
  2. --version or -V prints the version and exits 0.
  3. --status prints the recorded status and exits.

Everything else needs administrator rights. The tool checks its own token:

  • Elevated: it continues.
  • Not elevated, no --silent, and no interactive console (a script, a remote shell, redirected input): it logs why and exits 3 without prompting.
  • Not elevated, no --silent, interactive: it asks Would you like to restart as Administrator? (y/n). Yes relaunches the same command line through UAC and exits 0; no, or a failed relaunch, exits 3.
  • Not elevated with --silent: it cannot show a UAC prompt, logs that nothing was installed, and exits 3.

An elevated run then takes the Global\BootstrapMate.SingleInstance mutex. If another run holds it, this one logs Another BootstrapMate instance is already running - waiting for it to finish and waits up to 30 minutes, then exits 1.

Switches are matched case-insensitively, with two exceptions: -V (version) and -v (verbose) differ only by case and are matched exactly. An argument the tool does not recognise is an error: it logs Unrecognised argument: <arg> and exits 1.

Run with no arguments at all and the tool resolves the manifest URL from policy, machine settings or its built-in default, and runs. Because the MSI writes a machine-level ManifestUrl and the binary carries a default, a URL is effectively always available, so a bare invocation performs a real run. See Preferences.

Summary

Switch Argument Needs elevation Summary
--url URL Yes Manifest to download and run
--headers header value Yes Authorization header for this run
--help, -h Yes Print help and exit
--version, -V No Print the version and exit
--status No Print recorded phase status and exit
--last-run No Print a one-line summary of the last run and exit 0
--clear-status Yes Delete recorded status and exit
--clear-cache Yes Clear the BootstrapMate and Chocolatey caches and exit
--reset-chocolatey Yes Full Chocolatey reset and exit
--force Yes Clear all caches before the run
--verbose, -v Yes Debug lines on the console
--silent Yes No console output
--no-dialog Yes No progress dialog
--blur-screen Yes Progress dialog full screen
--dialog-title text Yes Progress dialog title
--dialog-message text Yes Progress dialog message
--pipe name Yes Mirror log lines to a named pipe
--save-settings further switches Yes Write settings to HKLM\SOFTWARE\BootstrapMate\Settings and exit
--follow-redirects Yes Accepted, logs a warning, has no effect
--reboot Yes Accepted, logs a warning, has no effect
--dry-run Yes Refuses to run and exits 1

Switches

--url <url>

  • Type: String (URL)
  • Default: the effective ManifestUrl from Preferences
  • Required: No

The manifest to download and run. It wins over every registry and policy source. Given without a following value, the tool prints ERROR: --url requires a URL parameter and exits 1.

When --url is given, the dialog title, message, NoDialog and BlurScreen values from policy and settings are not applied; only the matching command-line switches are. Policy and settings still supply EnableDialog, DialogIcon, SilentMode, VerboseMode, the credential headers, the signature settings, NetworkTimeout and the reporting settings.

--headers <value>

  • Type: String
  • Default: the stored AuthorizationHeader
  • Required: No

Sets the Authorization header for this run. It goes through the same path as the stored header, so it is still sent only to the manifest host. Without a value the tool exits 1. The value is replaced with <redacted> wherever the command line is logged, including session.json. Prefer the stored header; a value on a command line is visible to other processes while the run lasts.

--help, -h

Prints the help block, including the exit codes, and exits 0.

--version, -V

Prints the build version, for example 2026.10.05.1229, and exits 0. It is recognised in any position and needs no elevation. Uppercase -V is the version; lowercase -v is verbose.

managedbootstrapinstall.exe --version

--status

Prints, for each phase (SetupAssistant, Userland, Preflight), the recorded stage, architecture, start and completion times, exit code, last error, run id and manifest URL. Then it prints LastRunVersion from HKLM\SOFTWARE\BootstrapMate and the registry and file paths it read. It reads only HKLM\SOFTWARE\BootstrapMate and C:\ProgramData\ManagedBootstrap\status.json, so any user can run it, and it opens no session and never prompts. See Logging and Reporting for what each value means.

--last-run

Prints the outcome of the most recent run as a single line of at most 1000 characters, made for the output column of an Intune remediation script:

2026-10-04T10:04Z baseline partial_failure v2026.10.04.1200 installed=0 skipped=1 failed=1: Example Tools: Download stalled: no data for 60 seconds

The fields are the run's end time in UTC to the minute (its start time while it is still running), the run type, the status, the version, the item counts, and each failed item with its first error line. With no recorded run it prints no run recorded. It always exits 0, needs no elevation and creates no session. It reads C:\ProgramData\ManagedBootstrap\last-run.json.

--clear-status

Deletes HKLM\SOFTWARE\BootstrapMate\Status\<phase> for every phase and LastRunVersion from HKLM\SOFTWARE\BootstrapMate, in both registry views, and deletes C:\ProgramData\ManagedBootstrap\status.json. It does not touch last-run.json, baseline.json or the install ledger. Use it to re-test a device on the bench.

--clear-cache

Deletes the package cache C:\ProgramData\ManagedBootstrap\cache, the Chocolatey temp, lib-bad and logs directories and the current user's Chocolatey temp directory, and runs choco cache clear --all --force --yes when Chocolatey is present. Then it exits.

A normal run already empties the package cache at startup, and a file survives in it only when the install that used it failed.

--reset-chocolatey

Stops any running choco process, deletes C:\ProgramData\chocolatey (only its lib directory if the full delete fails) and cleans up the Chocolatey environment variables, so the next nupkg item that falls back to Chocolatey reinstalls it cleanly. On an interactive console it asks Are you sure you want to completely reset Chocolatey? (y/N) first; with --silent, or with redirected input, it proceeds without asking.

--force

Runs the same cache clear as --clear-cache before the run starts, then runs normally. The help text calls it deprecated: downloads are always fresh, so the cache holds only failed installs. The self-heal scheduled task does not pass it.

--verbose, -v

Writes Debug lines to the console as well as to the log. The log file receives Debug lines either way. VerboseMode in policy or settings turns this on, and a missing switch does not turn it off.

--silent

Suppresses console output. The log file is unaffected. SilentMode in policy or settings turns this on. An unelevated --silent run exits 3.

--no-dialog

Disables the progress dialog. NoDialog or EnableDialog = 0 in policy or settings does the same.

--blur-screen

Passes --fullscreen to the dialog binary so it covers the screen behind it.

--dialog-title <text>

  • Default: Setting Up Your Device

The dialog title for this run. Given without a value it is ignored.

--dialog-message <text>

  • Default: Please wait while we install required software...

The dialog message for this run. Given without a value it is ignored.

--pipe <name>

Connects to an existing named pipe on the local machine, with a five-second connect timeout, and mirrors every log line to it. A failed connect logs a warning and the run continues. The GUI does not use this; it tails the session log.

--save-settings

Writes settings to HKLM\SOFTWARE\BootstrapMate\Settings (64-bit view) and exits 0, or 1 on failure. No manifest is processed. It reads --url, --no-dialog, --dialog-title, --dialog-message, --dialog-icon, --silent and --verbose/-v from the rest of the command line. Put --save-settings first: the tool reads switches left to right, and --dialog-icon is unrecognised anywhere before it.

It writes every setting, not only the ones given: anything not on the command line is written at its default, so an existing ReportingUrl, ExpectedPublisher or BaselineMinIntervalHours in that key is reset. Settings that policy manages are skipped. It never writes AuthorizationHeader, but it deletes a stored ReportingHeader from HKLM\SOFTWARE\BootstrapMate\Secrets unless policy manages that setting.

managedbootstrapinstall.exe --save-settings --url https://example.com/bootstrap/bootstrapmate.json --dialog-title "Preparing your device"

--follow-redirects and --reboot

Accepted, and each logs a warning that it is ignored. Redirects are always followed, and BootstrapMate never restarts the machine.

--dry-run

BootstrapMate has no simulated install, so this switch refuses to run: it logs --dry-run is not implemented in the CLI. Refusing to run, because continuing would perform a real installation. and exits 1. DryRun set in policy or settings has the same effect on every run.

Exit codes

Code Meaning
0 Success. Also: --help, --version, --last-run, a successful --status, a preflight that chose Skip, a throttled baseline, an elevated relaunch that started
1 Usage error (unrecognised argument, missing value, --dry-run or DryRun), the manifest could not be fetched or parsed, the preflight failed, or 30 minutes passed waiting for another run
2 The run completed but one or more packages failed
3 Administrator rights are required and were not obtained. Nothing was attempted

Exit 2 comes with the failure recorded everywhere else too: the phase Stage is Failed with the failed names in LastError, last-run.json reads partial_failure, the run summary POST carries success: false, and LastRunVersion is not written by the run. See Logging and Reporting.

Examples

Run a manifest once, interactively, with full console detail:

managedbootstrapinstall.exe --url https://example.com/bootstrap/bootstrapmate.json --verbose

Run unattended with no console output and no dialog, as the scheduled task does:

managedbootstrapinstall.exe --silent --no-dialog

Check the last run from a remediation script or a support session:

managedbootstrapinstall.exe --last-run

Start the scheduled task, which runs as SYSTEM against the configured manifest:

schtasks /Run /TN "BootstrapMate Self-Heal"

See also

Clone this wiki locally