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

> Write a first bach.toml from an Inno Setup (.iss) or NSIS (.nsi) script, and see what could not be converted, so moving to Bach starts from a real file.

`bach import` reads an Inno Setup script (`.iss`) or an NSIS script (`.nsi`) and writes a first `bach.toml` next to it. Both are programming languages, so it reads only what has a setting in Bach, and lists what it left out. It runs on Windows, macOS and Linux.

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

```console 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
```

| Option | Meaning |
| - | - |
| `SCRIPT` | The `.iss` or `.nsi` file. |
| `--dry-run` | Print the `bach.toml` instead of writing it. |
| `--force` | Replace a `bach.toml` that is already next to the script. Without it the command stops. |

## What comes across

* The app's name, version, publisher, website and icon, the license file and the install folder's name.
* The folder the files come from (`[files] source`, the folder most `Source:` or `File` lines take from) and what they exclude.
* Whether the install is machine-wide (`PrivilegesRequired`, `RequestExecutionLevel`, a Program Files folder), the desktop shortcut, extra Start menu shortcuts, and programs the script runs from the install folder (`[[run]]`).
* `#define` constants (`{#Name}`) and `!define` constants (`${NAME}`) are filled in.

## What is listed instead

Registry writes, custom pages and code (`[Code]`, NSIS functions), components, `{tmp}` and system programs, files that go to other folders, and an `#include` file. A setting the script doesn't give is marked in the file (`# name = ""`), and [`bach check`](/docs/reference/cli/check) reports it.

> [!NOTE]
>
> Inno Setup asks for administrator rights unless the script says `PrivilegesRequired=lowest`, so such a script becomes `scope = "machine"` and the command says so. Delete that line if the app can live in one user's folder. Read the file before you build: it is a starting point, not a copy of what the old installer did.

See also [Migrate from another installer](/docs/guides/migrate-from-another-installer.md), which removes the old installer's install from computers that have it.


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