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

> bach sign signs an already built setup file with the program and arguments from the [signing] section of your bach.toml. Signing is optional.

`bach sign` signs a setup file you built earlier, using [`[signing]`](/docs/reference/config/signing). To sign during the build, use `bach build --sign` instead.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach sign "dist/Hello Notes-Setup-1.0.0.exe"
bach sign dist/Hello-Setup-1.4.0.exe --config path/to/bach.toml
```

| Argument or flag | Default | Meaning |
| - | - | - |
| `FILE` | required | The setup file |
| `--config FILE` | `bach.toml` | The config with `[signing]` |

Bach prints the command (with `{env:NAME}` not expanded), runs it and reports the result. A missing `[signing]` section, a program that can't start or a failing signer is an error.

## macOS setup files

For a `.dmg`, or a `.zip` that holds a Setup app, with `[updates] signer` set, Bach also checks the Setup app inside after your signing program ran. Installed copies look at that app, so signing the file around it changes nothing for them. An app they would refuse is an error. On a computer that isn't a Mac, Bach warns that it couldn't check. See [Protect your updates](/docs/guides/update-security.md#on-a-mac).

## Write the feed again

If your app has `[updates]`, write the feed again afterwards with [`bach feed`](/docs/reference/cli/feed), because the file changed.


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