Commands for installing Scala Programming Language Distribution 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 Scala.Scala.2 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Scala.Scala.2 -e --silentwinget uninstall --id Scala.Scala.2 -e --silentBy installer
32-bit · MSI · All users
Silent install
msiexec /i scala-2.13.8.msi /qn /norestartWrite a log
msiexec /i scala-2.13.8.msi /qn /norestart /l*v "%TEMP%\scala-programming-language-distribution-install.log"Uninstall
msiexec /x {7606E6DA-E168-42B5-8345-B08BF774CB30} /qn /norestart- MSI product code
- {7606E6DA-E168-42B5-8345-B08BF774CB30}
- Uninstall registry key
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7606E6DA-E168-42B5-8345-B08BF774CB30}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-scala-programming-language-distribution.ps1
$url = 'https://downloads.lightbend.com/scala/2.13.8/scala-2.13.8.msi'
$sha256 = '5CD1A12172234B5339635BF1BEEC584F56AD47942AB57C374576F673D6DE7A63'
$file = Join-Path $env:TEMP 'scala-2.13.8.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