Skip to main content
Every Bach setup file can install without showing a window, which IT tools and scripts need. There’s nothing to configure in bach.toml; this is built into every setup file. This page shows how to run it and read the result.

Install silently

A setup file is a windows program, so a terminal doesn’t wait for it by default. In PowerShell, use Start-Process with -Wait:
In Command Prompt:
/S works too, as do common switches from other installers such as /VERYSILENT and /qn.

Choose where and what

  • --dir sets the folder for a first install. Updates stay where the app already is.
  • --with and --without tick or untick options: desktop-shortcut, start-menu, autostart, path, auto-update, and the ids of your components. Only options your window would offer can be changed.
  • A path with spaces needs its own quotes inside the argument, as shown.
Setup file options lists every flag.

What a silent install does differently

  • It accepts your license for the user.
  • It doesn’t ask questions. Where the window would ask, it fails with exit code 1 instead: a newer version already installed (--allow-downgrade), files in the way (--overwrite), a missing requirement (--skip-requirements), or the app still running.
  • Apps with an access key need --key-file <file> or the BACH_ACCESS_KEY environment variable.

Exit codes

Logs

Each run writes %TEMP%\<app id>-setup.log. Use --log <file> to choose another place. When something fails, read the log; it says which step failed and why.

Uninstall silently

Add --delete-data to also delete the data folders listed in [uninstall]. Settings › Apps uses uninstall.exe --silent for its quiet removal.

Apps installed for all users

A setup file with installer.scope = "machine" needs administrator rights. Run it from an elevated terminal or through a deployment tool that runs as administrator or SYSTEM. Otherwise Windows shows its permission prompt, and declining it ends with exit code 1. Deploying across a company? See MSI, Intune and Group Policy.