> ## 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 verify: check a setup file for damage

> bach verify FILE: checks a Bach setup file without installing it, against the SHA-256 checksums recorded at build, and says whether it carries a signature.

`bach verify` checks that a setup file is whole. It installs nothing and writes nothing. Use it on a download that may have gone wrong, a copy someone changed, or the file a build server hands over.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach verify dist/Hello-Setup-1.4.0.exe
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Verifying Hello 1.4.0 (dist/Hello-Setup-1.4.0.exe)
  Signature    not signed
  Archive      SHA-256 matches (8650123 bytes)
  Files        12 checked against the manifest
dist/Hello-Setup-1.4.0.exe is intact.
```

| Argument or flag | Meaning |
| - | - |
| `FILE` | The setup file. |
| `--key-file PATH` | The access key's file (its first line), to open and check the files of an encrypted setup file. `BACH_ACCESS_KEY` does the same. |

## What it checks

It checks what setup checks while it installs, ahead of time:

* The archive as a whole against the SHA-256 recorded when the setup file was built.
* Every file against the size and SHA-256 in the manifest.
* That no file is missing from the archive and none is in it without being in the manifest.

A damaged file stops with exit code `1` and a sentence that names the first few files that are wrong.

## Notes

* `signature` says whether the file carries a signature. Bach reads only the entry in the file's header. Windows decides whether it is valid, and `signtool verify /pa` checks it. See [Signing](/docs/guides/signing.md).
* The runtime part of the file, the program that shows the window, is covered by that signature, not by `bach verify`.
* A setup file with [`[access]`](/docs/reference/config/access) has its files encrypted. Without a key, `bach verify` still checks the archive as a whole and says the files stayed shut. A wrong key is refused, not reported as damage.
* An online installer and an uninstaller carry no files, so there is nothing more to check. An update patch is checked too: the files it leaves out are on the computer already.

With `--json` it prints `verified`, `signature`, `files`, `name` and `version`. A damaged file is the usual `{"ok": false, "error": "…"}`.

See also [`bach inspect`](/docs/reference/cli/inspect).


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