Skip to main content
Some apps need something on the computer before they run: WebView2 for a Tauri app, a .NET runtime, the Visual C++ redistributable or a vendor file. Bach lets you declare these as [[requirements]]. Setup only looks, read-only and without administrator rights, and when something is missing it shows a page with a button to the download and a “Try again” button that looks again.

What happens when a requirement is missing

  • In the window, the install stops on a requirement page. It names the missing item, offers a button to its download page, and lets the user press “Try again” once it is installed.
  • In a silent install, setup stops with exit code 1 instead.
  • Requirements are checked before anything changes on disk, together with free space, the app not running and the archive checksum.

The five kinds

bach.toml
webview2, dotnet and vcredist know their own name and download page. file and registry need a name and an https url.
If your .NET app is published self-contained, you do not need a dotnet requirement. bach init writes one as a suggestion and says so in a comment.

Check it

bach check reports a requirement with a missing field as a sentence such as requirements[0]. followed by the problem. Give kind one of the five values above, and give file and registry a name and an https url.

Next step

Preview and build

Look at every page of the window, then write the setup file.