Skip to main content
bach verify checks that a setup file is whole. It installs nothing and writes nothing. Use it on a download that may have gone wrong, a copy someone changed, or the file a build server hands over.

What it checks

It checks what setup checks while it installs, ahead of time:
  • The archive as a whole against the SHA-256 recorded when the setup file was built.
  • Every file against the size and SHA-256 in the manifest.
  • That no file is missing from the archive and none is in it without being in the manifest.
A damaged file stops with exit code 1 and a sentence that names the first few files that are wrong.

Notes

  • signature says whether the file carries a signature. Bach reads only the entry in the file’s header. Windows decides whether it is valid, and signtool verify /pa checks it. See Signing.
  • The runtime part of the file, the program that shows the window, is covered by that signature, not by bach verify.
  • A setup file with [access] has its files encrypted. Without a key, bach verify still checks the archive as a whole and says the files stayed shut. A wrong key is refused, not reported as damage.
  • An online installer and an uninstaller carry no files, so there is nothing more to check. An update patch is checked too: the files it leaves out are on the computer already.
With --json it prints verified, signature, files, name and version. A damaged file is the usual {"ok": false, "error": "…"}. See also bach inspect.