exe installers (per user, or machine-wide with installer.scope = "machine") that accept --silent, which is what the Windows Package Manager needs. bach winget reads a finished setup file and writes the three manifests winget wants, ready for a pull request to microsoft/winget-pkgs.
Generate the manifests
--url must be the https link the setup file is downloaded from. Run the command on the final, signed file, because the manifests include the file’s SHA-256.
The package identifier is
Publisher.AppId, built from the publisher and the app id with only the characters winget allows.
What the manifests contain
InstallerType: exewithScope: user, orScope: machinefor a setup file withinstaller.scope = "machine".- The architecture of the setup file’s runtime:
x64, orarm64for a setup file built with the ARM64 runtime. MinimumOSVersion: 10.0.17763.0, the oldest Windows Bach supports (Windows 10 version 1809).- Install modes interactive, silent and silent with progress.
- Installer switches:
--silentfor silent installs,--dir "<INSTALLPATH>"for the install location and--log "<LOGPATH>"for the log. UpgradeBehavior: install, so a newer setup file updates in place.- A
ProductCodeequal to the app id, which is how Settings › Apps names the install. winget reads it to tell installed versions apart.
Validate and submit
Update the listing at every release
Bach’s own release workflow can open the pull request for each new version with Microsoft’swingetcreate. It runs for a normal release only, never for a pre-release, a draft or a dry run, and only when the repository has the secret WINGET_TOKEN (a classic token with public_repo scope) and the variable WINGET_PACKAGE (the package id). The package must already be listed, because wingetcreate update changes a listing and does not start one: the first pull request is made by hand, as above. Without the secret and the variable the job says so and passes.
The command refuses an uninstaller and anything that is not a Bach setup file, and it refuses a download link that is not https.