Commands for installing GnuWin32: Bison 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 GnuWin32.Bison -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GnuWin32.Bison -e --silentwinget uninstall --id GnuWin32.Bison -e --silentBy installer
32-bit · EXE (Inno Setup)
Silent install
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnuwin32-bison"PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-gnuwin32-bison.ps1
$url = 'https://sourceforge.net/projects/gnuwin32/files/bison/2.4.1/bison-2.4.1-setup.exe/download'
$sha256 = 'A9E32C320D88DBF682D27FA6F71146FC2E7409FF512F81E97FDC6C8A2CCF895C'
$file = Join-Path $env:TEMP 'download'
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