Skip to main content
bach test installs your setup file on a clean Windows, starts the app, removes it and tells you what went wrong and what was left behind. The sandbox is a fresh Windows every time and is thrown away at the end, so nothing is installed on your computer.
The exit code is 0 when every check passed and 1 otherwise. --json prints passed, steps and left_behind.

Without Windows Sandbox

Windows Sandbox isn’t on Windows Home, and it isn’t on GitHub’s Windows runners. bach test --here runs the same test, with the same checks and the same report, on the computer it is started on:
This installs the app for real and removes it again, so use it where that is harmless: a CI job or a virtual machine. If the app is already installed on the computer, the test fails at once with “already installed on this computer”, before it changes anything, so your own copy is never the one it removes. The Left behind check compares folders and keys before and after, so run it where nothing else is installing at the same time. A setup file that asks for administrator rights needs a job that already has them (a GitHub runner does), because nobody can accept Windows’ prompt.
Windows Sandbox comes with Windows 10 and 11 Pro, Enterprise and Education (not Home). Turn it on under “Turn Windows features on or off”. A setup file that asks for administrator rights shows Windows’ prompt inside the sandbox window; accept it there. A setup file with [access] needs a key a silent test can’t type.