Commands for installing 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 Anchor.cli -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Anchor.cli -e --silentwinget uninstall --id Anchor.cli -e --silentBy installer
64-bit · MSI · Current user · en-US
Silent install
msiexec /i msi-builder-x64.msi /qn /norestartWrite a log
msiexec /i msi-builder-x64.msi /qn /norestart /l*v "%TEMP%\cli-anchor-install.log"Uninstall
msiexec /x {C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9} /qn /norestart- MSI product code
- {C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9}
- Uninstall registry key
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9}
- UpgradeCode
- {A7CF6DDC-58DA-4A29-94C7-3D46C9BE0944}
- Install folder
- %ProgramFiles%\Anchor CLI
32-bit · MSI · Current user · en-US
Silent install
msiexec /i msi-builder-x86.msi /qn /norestartWrite a log
msiexec /i msi-builder-x86.msi /qn /norestart /l*v "%TEMP%\cli-anchor-install.log"Uninstall
msiexec /x {C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9} /qn /norestart- MSI product code
- {C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9}
- Uninstall registry key
- HKCU\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C5F94F62-E3CC-48E2-AB3C-4DED8C6099E9}
- UpgradeCode
- {A7CF6DDC-58DA-4A29-94C7-3D46C9BE0944}
- Install folder
- %ProgramFiles(x86)%\Anchor CLI
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-cli-anchor.ps1
$url = 'https://github.com/anchordotdev/cli/releases/download/v0.1.12/msi-builder-x64.msi'
$sha256 = '0B4E7B2126F3F790C111F6519850803B17D4C1DBADCC16D9B646BF5E424B8E63'
$file = Join-Path $env:TEMP 'msi-builder-x64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-cli-anchor.ps1
$url = 'https://github.com/anchordotdev/cli/releases/download/v0.1.12/msi-builder-x86.msi'
$sha256 = 'FFD9C0B66661279E75D83F19CAA335DDEEB32D5B85970A20BC0B0200BAA2D61A'
$file = Join-Path $env:TEMP 'msi-builder-x86.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait