Skip to main content
[installer] controls the setup file you get and how it behaves: where it installs, which options users see, what it looks like. Every setting is optional.
bach.toml

The setup file

output

Path, default dist/{name}-Setup-{version}.exe. Where the setup file is written, relative to bach.toml. Must end in .exe. Placeholders: {name}, {version}, {id}. With updates.github, characters GitHub would rename become -. ARM64 builds add -arm64 before .exe. bach build --out overrides it once.

online

true or false (default). Also build an online installer. Needs [updates]. Same as bach build --online.

online_output

Path, default dist/{name}-Web-Setup.exe. Where the online installer goes. Must end in .exe and differ from output. It has no version in its name, so one download link keeps working.

Install location

scope

"user" (default) or "machine". "user" installs for the person running setup, without administrator rights. "machine" installs for every user into %ProgramFiles% after one Windows permission prompt. See Install location.

folder

Folder name, default app.id. The folder under %LOCALAPPDATA%\Programs (or %ProgramFiles%). If the user chooses another place, this name is added to it. Follows the same character rules as app.id.

change_folder

true (default) or false. Whether users can choose another location. Updates always stay in the existing folder.

Options

These take true, false, "always" or "never" (what they mean). On updates, users’ earlier choices are kept.

path_folder

Folder inside the install folder, default the install folder itself. What add_to_path puts on PATH, such as "bin". Bach warns if no installed file is in it.

start_menu_folder

Name, optional. Puts your shortcuts into this Start menu folder, such as your company’s name. Can’t contain < > : " / \ | ? *. Removed after uninstall if empty.

shared_files

"first" (default) or "all". What a file matched by several components needs. Needs Bach 0.11.1 or newer.

Window buttons

open_button

true (default) or false. Show Open <app> on the last page.

website_button

true or false (default). Show a link to app.website on the last page. Needs app.website.

Look

Walkthrough: Customize the install window. Path to a .png or .svg, or "none". Default: the PNG inside app.icon, otherwise the Bach mark. SVG logos are drawn in one color that follows the theme. The logo, fonts and pictures together have a size limit; Bach tells you if you pass it.

logo_height

Number, 32 to 96, default 56. The logo’s height in points.

theme

"system", "light" or "dark". Default "system", or the style’s own preference (some styles default to dark).

accent

Color such as "#2563eb". Buttons, progress bar and ticked boxes. Don’t set it together with [style] accent.

style

Name of a built-in style, default bach. bach styles lists the 14. See [style].

Languages and license

languages

List of language codes, default all 19. The window uses the user’s Windows language if listed, otherwise the first in the list. Codes: en, de, nl, fr, es, it, pt (Brazilian Portuguese), pl, ru, tr, ja, ko, zh (Simplified Chinese), zh-tw (Traditional Chinese), sv, cs, vi, id, hi. Windows tags such as zh-TW, zh-HK or zh-Hant select zh-tw.

license

Path, or a table of paths by language such as { en = "LICENSE.txt", de = "LIZENZ.txt" }. Optional. A plain text file in UTF-8 or UTF-16 that users must accept. Bach limits its size and tells you if it’s too long.

Compression

compression

"best" (default), "normal" or "fast". best makes the smallest file; the others build faster. Installing is fast with all three. bach build --fast uses fast once.

compression_threads

1 to 256, default: as many as the memory budget allows, at most the number of processor cores. The setup file is identical whatever the number.

compression_memory

Memory budget in MiB, 64 to 65536, default 1024. Limits the number of compression threads. Lower it in containers with little memory. Measured on 300 MB of mixed files on 12 cores:

Taskbar grouping

Every shortcut Bach creates carries an AppUserModelID made from the app id: characters other than letters, digits, ., _ and - become ., at most 128 characters (My App becomes My.App). For Windows to group your windows with the shortcut, your program should use the same ID with SetCurrentProcessExplicitAppUserModelID, or not set one.