Skip to main content
Some apps don’t run unless something else is already on the computer, such as a .NET runtime or WebView2. A requirement makes the installer check for it before installing, and tell the user where to get it if it’s missing.

Add a requirement

bach.toml
If WebView2 is missing, the install window shows a page naming it, with a button that opens its download page and a Try again button. The user installs it and continues. A silent install stops with exit code 1 and prints what’s missing; --skip-requirements installs anyway. Requirements are only checked. Setup doesn’t install anything for them and needs no administrator rights to look.

The kinds of requirement

Bach knows a name and download link for webview2, dotnet, vcredist and windows. You can replace them with your own name and url. For file and registry you have to give both. url must start with https://.

Examples

A WPF app that isn’t published self-contained:
bach.toml
An app that needs Windows 11:
bach.toml
Common build numbers are 17763 (Windows 10 version 1809), 19041 (version 2004) and 22000 (Windows 11). A vendor’s driver, recognized by its registry key:
bach.toml
A file, where %VARIABLES% are filled in:
bach.toml

Installing the requirement for the user

If you’d rather ship the runtime’s installer inside your app and run it, see Run programs during setup. That’s useful when your users may be offline.

Test it

bach preview shows your install page, but it can’t show you what happens on a computer that lacks the requirement. Test the real installer on a clean computer or in Windows Sandbox, which has none of your development tools.