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

# Ship your first update

> Release a new version of your app: raise the version, build again and run the new setup file over the old install. See what changes and what stays.

Once people have your app, you'll want to send them a newer version. This page shows how updating works with Bach, using a new setup file. Having the app update itself is a separate step, covered at the end.

## 1. Raise the version

Change the version in `bach.toml`:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[app]
name = "Hello Notes"
version = "1.1.0"            # was 1.0.0
publisher = "Your Name"
executable = "hello-notes.exe"

[files]
source = "build"
```

Or leave the file alone and pass it when building: `bach build --app-version 1.1.0`.

Keep `name` the same, or if you rename the app, set [`id`](/docs/guides/write-bach-toml#the-id-keep-it-stable) to the old name. The id is how the new setup file finds the old installation.

## 2. Rebuild your app, then the installer

Build your app with your usual tool, then:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach build
```

You get `dist/Hello Notes-Setup-1.1.0.exe`.

## 3. Run it over the old version

When someone who has 1.0.0 runs the new file, the window says it will **update** instead of install. Then:

* The app is installed into the same folder as before.
* The choices made last time, such as the desktop shortcut and optional components, are kept.
* Files that version 1.1.0 no longer has are deleted from the install folder.
* Files your app created itself while running, such as logs or settings, are left alone.
* If anything fails, for example a file is locked or the disk is full, the old version is put back exactly as it was.

If the app is running, setup asks to close it first.

## What about older versions?

If someone runs an older setup file over a newer installation, the window warns that a newer version is already installed. A silent install refuses unless you add `--allow-downgrade`.

## Having the app update itself

So far your users have to download and run the new file. With an `[updates]` section, the installed app checks for new versions in the background and installs them when it's closed:

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[updates]
github = "your-name/hello-notes"
```

[Automatic updates](/docs/guides/automatic-updates.md) explains how that works and what you need to publish with each release. Add `[updates]` before your first public release if you can: copies installed without it can't update themselves.


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