> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Exit codes

> What exit codes setup files, uninstall.exe and the bach command return, why a silent install fails with 1, and how to read the code and log.

Scripts and deployment tools use exit codes to tell whether something worked. This page lists them.

## Setup files and uninstall.exe

| Code | Meaning |
| - | - |
| 0 | Done, or nothing needed doing |
| 1 | Failed. The reason is printed and logged. |
| 2 | Wrong command line, or a missing access key |
| 10 | Update options only: a newer version is available or ready |

A silent install exits with 1 when, for example:

* a requirement is missing (unless `--skip-requirements`)
* a newer version is installed (unless `--allow-downgrade`)
* files are in the way on a first install (unless `--overwrite`)
* the app or another setup of it is running
* the disk is full, or a file can't be written
* a run step or service fails
* the administrator prompt is declined
* the access key is wrong

Update options have their own meanings: see [Uninstaller options](/docs/reference/setup/uninstaller.md#updates).

## The bach command

`0` on success, non-zero on failure, with a readable message.

## Read the code and log

```powershell theme={"theme":{"light":"github-light","dark":"github-dark"}}
$p = Start-Process ".\Hello-Setup-1.4.0.exe" -ArgumentList '--silent' -Wait -PassThru
if ($p.ExitCode -ne 0) { Get-Content "$env:TEMP\Hello-setup.log" -Tail 20 }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.