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

# Check that your app's requirements are installed

> Stop an install early when WebView2, .NET, the Visual C++ runtime, a file, a registry key or a Windows version your app needs is missing.

Some apps don't run unless something else is already on the computer, such as a .NET runtime or WebView2. A requirement makes the installer check for it before installing, and tell the user where to get it if it's missing.

## Add a requirement

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[requirements]]
kind = "webview2"
```

If WebView2 is missing, the install window shows a page naming it, with a button that opens its download page and a **Try again** button. The user installs it and continues. A [silent install](/docs/guides/silent-installs.md) stops with exit code 1 and prints what's missing; `--skip-requirements` installs anyway.

Requirements are only checked. Setup doesn't install anything for them and needs no administrator rights to look.

## The kinds of requirement

| `kind` | Checks for | You also give |
| - | - | - |
| `"webview2"` | Microsoft Edge WebView2, used by Tauri and Wails apps | nothing |
| `"dotnet"` | a .NET runtime | `version`, such as `"8.0"`; `desktop = true` for WPF and Windows Forms |
| `"vcredist"` | the Microsoft Visual C++ 2015-2022 runtime | nothing |
| `"windows"` | a minimum Windows version | `build`, a Windows build number |
| `"file"` | a file that must exist | `path`, `name`, `url` |
| `"registry"` | a registry key that must exist | `key`, `name`, `url` |

Bach knows a name and download link for `webview2`, `dotnet`, `vcredist` and `windows`. You can replace them with your own `name` and `url`. For `file` and `registry` you have to give both. `url` must start with `https://`.

## Examples

A WPF app that isn't published self-contained:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[requirements]]
kind = "dotnet"
version = "8.0"
desktop = true
```

An app that needs Windows 11:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[requirements]]
kind = "windows"
build = 22000
```

Common build numbers are 17763 (Windows 10 version 1809), 19041 (version 2004) and 22000 (Windows 11).

A vendor's driver, recognized by its registry key:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[requirements]]
kind = "registry"
key = 'HKLM\SOFTWARE\Vendor\Driver'
name = "Vendor Driver"
url = "https://vendor.example/download"
```

A file, where `%VARIABLES%` are filled in:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[requirements]]
kind = "file"
path = '%SystemRoot%\System32\vendor.dll'
name = "Vendor runtime"
url = "https://vendor.example/runtime"
```

## Installing the requirement for the user

If you'd rather ship the runtime's installer inside your app and run it, see [Run programs during setup](/docs/guides/run-programs.md). That's useful when your users may be offline.

## Test it

`bach preview` shows your install page, but it can't show you what happens on a computer that lacks the requirement. Test the real installer on a clean computer or in [Windows Sandbox](/docs/guides/preview-and-build.md#test-a-real-install), which has none of your development tools.


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