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

# Windows integration: shortcuts, link schemes and file types

> Add extra Start menu shortcuts, register myapp:// link schemes and file types, and know how Bach avoids taking over other programs' associations.

An installed app often needs more than a program file: a second shortcut, a `myapp://` link that opens it, or a file type it can open. Bach declares these in `bach.toml` and registers them for the current user only, never taking anything away from another program.

## Extra Start menu shortcuts

The app's own shortcut comes from `start_menu_shortcut`. For more, such as a second program in the install folder or the app started with arguments, add `[[shortcuts]]`:

```toml bach.toml theme={null}
[[shortcuts]]
name = "Hello Docs"
target = "docs/viewer.exe"       # relative to [files] source
arguments = "--welcome"           # optional
description = "Read the manual"   # optional tooltip
```

Extra shortcuts follow the Start menu box and go away when their file is not installed, for example because its component was unticked.

## Link schemes

A link like `myapp://open?file=x` starts your app with the link as its first argument.

```toml bach.toml theme={null}
[[protocols]]
scheme = "myapp"
description = "My App link"         # optional
```

* Registered for the user only.
* Schemes that belong to Windows or browsers (`http`, `file`, `ms-...` and so on) are refused.
* If another program already owns the scheme, setup leaves it alone.

## File types

Declare the files your app opens:

```toml bach.toml theme={null}
[[file_types]]
extension = ".mydoc"
description = "My App document"     # optional
```

The type is listed under **Open with**. Your app becomes the default only for types no other program opens yet, so installing your app never takes files away from another one. Types that run code (`.exe`, `.bat`, `.ps1`, `.lnk` and similar) are refused.

## Start with Windows and PATH

These are options on the install page, described in [Choices and components](/docs/guides/choices-and-components.md):

* `start_with_windows` starts the app when the user signs in (`HKCU\...\Run`).
* `add_to_path` puts a folder on the user's `PATH` so command-line tools run from any terminal.

## How removal stays safe

The registry keys Bach creates for link schemes and file types carry a `BachApp` mark. Keys without that mark belong to another program and are never changed or deleted. On uninstall, each integration is removed only if it is this install's own.

## Next step

> [card] [Requirements](/docs/guides/requirements.md)
>
> Check for WebView2, .NET or the Visual C++ runtime before installing.


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