Skip to main content
[updates] lets the installed app update itself. bach build writes latest.json next to the setup file. Publish both, and the app finds new versions. With GitHub releases one line is enough:
bach.toml
With a server of your own:
bach.toml
With installer.scope = "machine", auto must be left out or "never", because a background update would have to write to Program Files. Either github or feed is needed. app.version must be numbers like 1.4.0 (a suffix like -beta.1 is fine), because the app compares versions. bach check warns when app.version is not a version it can compare (like abc, or a number beyond 18446744073709551615): installed copies then treat every setup file as an update, and the downgrade protection does nothing. Without download_url (and without github), bach build writes no latest.json and prints a warning. After uploading the setup file, run bach feed SETUP --url URL. Signing changes the setup file and so its SHA-256. After signing, write the feed again with bach feed SETUP.exe. To offer an update to a share of computers first, add --rollout 10: see Staged rollouts. To spare computers the whole download, bach build --patch-from OLD-SETUP.exe also writes a patch with only the files that changed: see Update patches. For a private server that checks an access key, see [access] and Private updates.

What it adds

With [updates], the installed uninstall.exe answers --check-update, --download-update, --apply-update, --update and --auto-update (see Command line). The install page gets the “Automatic updates” box unless auto is "always" or "never". Ticked, setup adds a per-user scheduled task named Bach\<app id> that runs uninstall.exe --auto-update every four hours. Unticking the box, an update without it and uninstalling all delete the task. See Updates for the guide and bach feed for the command.