Commands for installing DOSBox 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 DOSBox.DOSBox -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id DOSBox.DOSBox -e --silentwinget uninstall --id DOSBox.DOSBox -e --silentBy installer
32-bit · EXE (NSIS) · All users · en-US
Silent install
DOSBox0.74-3-win32-installer.exe /SCustom folder
DOSBox0.74-3-win32-installer.exe /S /D=C:\Apps\dosbox- Install folder
- %ProgramFiles(x86)%\DOSBox-0.74-3
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-dosbox.ps1
$url = 'https://sourceforge.net/projects/dosbox/files/dosbox/0.74-3/DOSBox0.74-3-win32-installer.exe'
$sha256 = 'A9E270217D12867C2609D9423D1B2ED83FCF7CD08AEEEE3AB09A4AFDF9E9418E'
$file = Join-Path $env:TEMP 'DOSBox0.74-3-win32-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