Skip to content
Latchkey

choco install: Chocolatey Packages in Windows CI

choco install installs Chocolatey packages; in CI you pass -y to skip confirmation and --no-progress to avoid spamming the log with progress bars.

Chocolatey is preinstalled on GitHub and Azure Windows runners, making it the fastest way to add a missing tool. The flags below keep the install non-interactive and the logs readable.

What it does

choco install downloads and installs a package (and its dependencies) from a Chocolatey source. It returns 0 on success and 3010 when the install succeeded but a reboot is required, which is common for MSI-based packages.

Common usage

PowerShell
# non-interactive install for CI
choco install nodejs --version=20.11.0 -y --no-progress

# multiple packages
choco install git 7zip openjdk -y --no-progress

# treat reboot-required (3010) as success
choco install somemsi -y --no-progress --ignore-package-exit-codes

Options

FlagWhat it does
-y / --yesConfirm all prompts (required in CI)
--no-progressSuppress download progress bars in the log
--version=<v>Pin an exact package version
--source=<url>Use a specific feed instead of the default
--ignore-package-exit-codesTreat 3010 and similar as success
--install-arguments=<a>Pass native installer arguments

In CI

Pin versions with --version so a new package release cannot silently change your toolchain. Add --no-progress everywhere; the progress bar produces thousands of carriage-return lines that bloat the log artifact.

Common errors in CI

"Exit code was 3010. The build was probably successful, but please reboot" means the package installed but wants a reboot; pass --ignore-package-exit-codes or map 3010 to success yourself. "The package was not found with the source(s) listed" means a typo in the package id or the feed is unreachable. "Cannot acquire the lock" or "Chocolatey is currently in use" means two choco processes are running; serialize installs into one command.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →