Skip to main content
bach choco writes the Chocolatey package that installs a setup file: a .nuspec, an install script that downloads the setup file, checks its SHA-256 and runs it with --silent, and an uninstall script that runs the app’s own uninstaller.

Output

The folder holds <id>.nuspec, tools/chocolateyInstall.ps1 and tools/chocolateyUninstall.ps1. The package id is the app id in lowercase, with every other character turned into -. The install script carries the SHA-256 of the file you gave (checksum64, or checksum for an x86 runtime), so Chocolatey refuses a download that differs. The uninstall script finds the app under Settings › Apps by its app id, in HKLM and HKCU, and runs its uninstaller with --silent.
Chocolatey runs as an administrator, so a per-user app (the default) is installed for that account only. Set installer.scope = "machine" to install for every user. bach choco warns for the other apps. It refuses a version that NuGet does not accept (like 1.2.3 or 1.2.3-beta are), and warns that an ARM64 setup file is listed as the 64-bit download, because Chocolatey has no ARM64 field.
Publish the .nupkg that choco pack makes to your own feed or to the Chocolatey community repository. See also bach winget.