Commands for installing Scratch 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 erictli.scratch -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id erictli.scratch -e --silentwinget uninstall --id erictli.scratch -e --silentBy installer
64-bit · EXE (NSIS) · en-US
Silent install
Scratch_1.0.0_x64-setup.exe /SCustom folder
Scratch_1.0.0_x64-setup.exe /S /D=C:\Apps\scratchPowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-scratch.ps1
$url = 'https://github.com/erictli/scratch/releases/download/v1.0.0/Scratch_1.0.0_x64-setup.exe'
$sha256 = 'D240C47F4215E1BAB4283C0446402E703776F86AD5D904BAAB2964A1AEE4C968'
$file = Join-Path $env:TEMP 'Scratch_1.0.0_x64-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 '/S' -Wait