Skip to main content
This page covers the steps between writing bach.toml and handing out a setup file: checking it, looking at the window, building, and making sure a real install works.

Check the config

This reads bach.toml and the build folder, then prints a summary and the list of files that will be installed. It changes nothing and works on every system. Look at the file list: anything in it ends up on your users’ computers.

Preview the window

The real install window opens, built from your config. Every step is only pretended, so nothing is installed and you can click through it as often as you like. Useful variations:
If your app uses [access], the preview asks for a key. Any key works there. Preview needs Windows. On a Mac it shows the macOS window, and needs a [macos] section.

Keep the preview open while you edit

bach watch opens the preview and reopens it every time you save bach.toml, your logo, your license or another file it names. If the config has a mistake, it prints it and keeps the old window. Stop it with Ctrl+C.

Build the setup file

The setup file is written to dist/<name>-Setup-<version>.exe, for example dist/Hello Notes-Setup-1.0.0.exe. Change the name or folder with installer.output, or for one build with --out:
Bach compresses as small as it can by default. While you’re testing, bach build --fast builds quicker and makes a slightly bigger file. If the build fails, nothing is left half-written: an earlier setup file stays as it was.

Look inside a setup file

This shows the app id, version, program, install folder, shortcuts, options and everything else the file carries. It works on an installed uninstall.exe too. bach verify checks that a setup file isn’t damaged:

Test a real install

Preview shows what your users see, but only a real install shows whether your app starts. A real install changes the computer it runs on, so the safest choice is a computer you can throw away.

In Windows Sandbox

Windows 10 and 11 Pro, Enterprise and Education have Windows Sandbox, a temporary copy of Windows. Windows Home doesn’t.
  1. Turn on Windows Sandbox in “Turn Windows features on or off”, if you haven’t.
  2. Build, then run:
Bach opens a fresh sandbox, installs your setup file silently, starts your app for 5 seconds, removes it and prints what worked, plus any files or registry keys left behind. Add --keep to leave the sandbox open and look around. See bach test for all options.

By hand

Copy the setup file to another computer or virtual machine and run it. Check that:
  • the app starts from the Start menu
  • features that need files next to the program work
  • it appears under Settings › Apps and can be removed
If you test on your own computer, remember that it really installs. Remove it again from Settings › Apps afterwards.

Read the log when something fails

Every install, update and removal writes a log to %TEMP%\<app id>-setup.log. To write it somewhere else:
Install problems explains the most common errors.

Before you share it