> ## 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.

# Uninstaller options

> Options of the installed uninstall.exe: silent removal, deleting data, checking for and applying updates, update channels and what each returns.

Each installed app has an `uninstall.exe` in its folder. It removes the app and, for apps with `[updates]`, handles updates. This page lists its options.

For a per-user app, the folder is usually `%LOCALAPPDATA%\Programs\<app>`. From PowerShell:

```powershell theme={"theme":{"light":"github-light","dark":"github-dark"}}
$uninstall = "$env:LOCALAPPDATA\Programs\Hello Notes\uninstall.exe"
$p = Start-Process $uninstall -ArgumentList '--silent' -Wait -PassThru
$p.ExitCode
```

## Removal

With no options, it opens the removal window. Because a program can't delete itself, a per-user uninstaller copies itself to the temp folder and runs from there. A machine-wide one asks for administrator rights and runs in place.

| Option | Meaning |
| - | - |
| `--silent` | Remove without a window, in place, so you can wait for the exit code |
| `--delete-data` | Also delete the data folders in `[uninstall] data` |
| `--lang CODE` | Language |
| `--log FILE` | Log file |

## Updates

For apps with [`[updates]`](/docs/reference/config/updates):

| Option | What it does | Exit code |
| - | - | - |
| `--check-update` | Reports whether there's a newer version | 10 newer, 0 up to date, 1 feed unreadable |
| `--check-update --json` | Same, as one JSON line: `app`, `current`, `latest`, `available`, `downloaded`, `notes`, `size` | same |
| `--download-update` | Downloads it and keeps it ready; resumes cut-off downloads | 10 ready, 0 up to date |
| `--apply-update` | Installs what's ready, silently | 0 done or nothing waiting, 1 not yet |
| `--wait-for PID` | With `--apply-update` or `--update`: wait up to 10 minutes for that process to end | |
| `--launch` | With `--apply-update` or `--update --silent`: start the app afterwards | |
| `--update` | Download (or use the ready one) and open its window | |
| `--update --silent` | Install the newer version without a window | the setup's code |
| `--auto-update` | One background round; the scheduled task runs this | 10 ready but app open, 0 otherwise |
| `--channel beta`, `stable`, `show` | Choose the update channel, or show it | 1 for `beta` without `beta_feed` |

Apps without `[updates]` answer update options with exit code 2.

Computers outside a [staged rollout](/docs/guides/patches-and-rollouts.md#release-to-some-users-first) count as up to date, except for `--update`.

Protected apps use the key saved at install, or `--key-file` or `BACH_ACCESS_KEY`. Update runs log to `%TEMP%\<app id>-update.log`.

On macOS, the uninstaller is `Uninstall <app>.app`; run `Contents/MacOS/bach-setup` with the same options. `--cleanup-if-removed` is used by Bach's own watcher.


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