Commands for installing GNU Backgammon 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 GNU.gnubg -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GNU.gnubg -e --silentwinget uninstall --id GNU.gnubg -e --silentBy installer
32-bit · EXE (Inno Setup)
Silent install
gnubg-1_08_003-20240428-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
gnubg-1_08_003-20240428-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnu-backgammon"- Uninstall registry key
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\GNU Backgammon_is1
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-gnu-backgammon.ps1
$url = 'https://ftp.gnu.org/gnu/gnubg/gnubg-1_08_003-20240428-setup.exe'
$sha256 = '68CD01D92A99E6EC4BDB5F544C14ECBFCC7D9119AFB0D2AC189698B309E62D06'
$file = Join-Path $env:TEMP 'gnubg-1_08_003-20240428-setup.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait