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

# Choices and optional components in the install window

> Decide which shortcuts, PATH and autostart options users see, how true, false, always and never behave, and how to split your app into optional components.

The install page shows a short list of choices: where to install, optional parts of your app, and a few options like shortcuts. You control every one of them from `bach.toml`. This page explains the four values an option can take, what each option does, and how optional components work.

## Where the app installs

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[installer]
folder = "My App"            # name under %LOCALAPPDATA%\Programs (default: the app id)
change_folder = true         # may the user pick another place?
open_button = true           # offer "Open My App" on the last page
start_menu_folder = "Hello Inc."  # group the shortcuts in a Start menu folder
website_button = false       # link to app.website on the last page
```

By default the app installs to `%LOCALAPPDATA%\Programs\<folder>`. When the user picks another place, `folder` is added to it. Updates always stay where they are. A `start_menu_folder` is removed after uninstalling when it is empty.

## The four values of an option

Each option takes one of four values:

| Value | The install page | What happens |
| - | - | - |
| `true` | Shows a ticked box | Done, unless the user unticks it |
| `false` | Shows an unticked box | Done only if the user ticks it |
| `"always"` | Shows nothing | Always done |
| `"never"` | Shows nothing | Never done |

| Setting | Default | What it does |
| - | - | - |
| `desktop_shortcut` | `true` | A shortcut on the desktop |
| `start_menu_shortcut` | `"always"` | A shortcut in the Start menu |
| `start_with_windows` | `"never"` | Starts the app when the user signs in |
| `add_to_path` | `"never"` | Adds the app's folder to the user's `PATH` |
| `path_folder` | the install folder | The folder, inside the install folder, that goes on `PATH`, like `"bin"` |

The whole row is a click target: clicking anywhere on it ticks or unticks its box. On an update, the boxes start the way the user left them last time, and unticking one takes the shortcut, `PATH` entry or autostart away again.

With an [`[updates]`](/docs/reference/config/updates) section, the page has one more box, "Automatic updates", ticked. Its setting is `auto` in `[updates]` and takes the same four values.

> [!NOTE]
>
> `add_to_path` edits only the user's own `PATH`. Exactly one entry is ever added or removed, and the rest of `PATH` is kept byte for byte.

## Optional components

Components are optional parts of your app, each shown as one box on the install page. Files that no component claims are always installed.

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[components]]
id = "samples"                      # lowercase; also its name for --with
title = { en = "Sample projects", de = "Beispielprojekte" }
description = "Examples to learn from."
files = ["samples/**"]              # patterns, like [files] exclude
default = true                      # ticked on a first install
```

Rules:

* A file belongs to the first component whose pattern matches it.
* A component must match at least one file.
* `app.executable` cannot be in a component.
* Unticking a component on an update removes its files.
* `title` and `description` can be text or a table with one text per language.

Silent installs pick components with `--with samples` and `--without samples`. See [Silent installs](/docs/guides/silent-installs.md).

## Next steps

> [card] [Integration](/docs/guides/integration.md)
>
> Extra shortcuts, link schemes and file types.

> [card] [Reference: \[installer\]](/docs/reference/config/installer)
>
> All installer settings at a glance.


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