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

# [[migrate]]: remove an older installation

> Remove an Inno Setup, NSIS or MSI installation of your app before the first Bach install: settings, timeouts and what may run with admin rights.

When your app moves to Bach from another installer, `[[migrate]]` names the old installation so setup removes it first. Walkthrough, including how to find the key: [Migrate to Bach](/docs/guides/migrate-from-another-installer.md).

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[migrate]]
uninstall_key = '{8A69D345-D564-463C-AFF1-A69D9E530F96}_is1'
```

| Setting | Default | Meaning |
| - | - | - |
| `uninstall_key` | required | The entry's name under `Software\Microsoft\Windows\CurrentVersion\Uninstall` (user or computer, 64 or 32-bit). The name only, not a path; up to 128 characters. |
| `arguments` | none | Added to the entry's `UninstallString` to make it quiet, up to 500 characters. Without it, setup uses `QuietUninstallString`; with neither, the old install is left alone. MSI entries are removed with `msiexec /x {code} /qn /norestart`. |
| `elevated` | `false` | Also remove an installation for all users (under `HKLM`). Windows asks for administrator rights. |

## Behavior

* Runs only on a first Bach install, before any file is placed.
* Runs only the command in that entry, without a shell, and only if it's an absolute path to an existing `.exe`.
* Waits up to 15 minutes for the old uninstaller, then up to 90 seconds for its entry to disappear.
* Never stops your install. Anything that goes wrong is logged and the install continues.
* Doesn't touch user data; the old uninstaller decides what it removes.

## Limits on elevated removal

* A per-user old install is never run by a setup that has administrator rights.
* An all-users old install is removed only with `elevated = true` (or when setup is already elevated), and only if its uninstaller is inside Program Files or the Windows folder.

`bach inspect` shows entries as `Replaces`. Windows only.


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