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

# bach import

> bach import turns an Inno Setup or NSIS script into a first bach.toml, and lists everything it couldn't convert so you can finish it by hand.

`bach import` reads an Inno Setup (`.iss`) or NSIS (`.nsi`) script and writes a first `bach.toml` next to it. Installer scripts can contain program logic, so it only converts what has a Bach setting and lists the rest.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach import installer.iss
bach import installer.nsi --dry-run
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Wrote .\bach.toml from installer.iss

Not converted, because Bach has no setting for it:
  - [Code] (Pascal script): custom pages, checks and logic have no Bach equivalent

Paths are relative to the script's folder. Next: bach check
```

| Argument or flag | Meaning |
| - | - |
| `SCRIPT` | The script |
| `--dry-run` | Print the result instead of writing it |
| `--force` | Replace an existing `bach.toml` next to the script |

## What's converted

* Name, version, publisher, website, icon, license file and install folder name
* The folder files come from, and what's excluded
* Whether it installs for all users, the desktop shortcut, extra Start menu shortcuts, and programs run from the install folder
* `#define` and `!define` constants

Registry writes, custom pages and code, components, temporary or system programs, files going elsewhere and `#include` files are listed instead. Missing values are marked in the file (`# name = ""`), and `bach check` reports them.

Inno Setup asks for administrator rights unless the script has `PrivilegesRequired=lowest`, so such a script becomes `scope = "machine"`, and Bach says so. Remove it if your app can live in one user's folder.

For components, see [`[[components]]`](/docs/reference/config/components). To remove the old installation on users' computers, add [`[[migrate]]`](/docs/reference/config/migrate).


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