Commands for installing balena-cli without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id Balena.BalenaCLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Balena.BalenaCLI -e --silentwinget uninstall --id Balena.BalenaCLI -e --silentBy installer
64-bit · EXE (NSIS) · All users
Silent install
balena-cli-v25.2.7-windows-x64-installer.exe /SCustom folder
balena-cli-v25.2.7-windows-x64-installer.exe /S /D=C:\Apps\balena-cli- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\balena-cli
- Install folder
- %ProgramFiles%\balena-cli
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-balena-cli.ps1
$url = 'https://github.com/balena-io/balena-cli/releases/download/v25.2.7/balena-cli-v25.2.7-windows-x64-installer.exe'
$sha256 = 'EB69C226F3EC22C6FB535F36B111C96419BBC5B9735BD16CC2CB28CD755344E0'
$file = Join-Path $env:TEMP 'balena-cli-v25.2.7-windows-x64-installer.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait