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, useStart-Process with -Wait:
/S works too, as do common switches from other installers such as /VERYSILENT and /qn.
Choose where and what
--dirsets the folder for a first install. Updates stay where the app already is.--withand--withouttick 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.
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 theBACH_ACCESS_KEYenvironment 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
--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 withinstaller.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.