Commands for installing Setup_test 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 PMX.Setup_test -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PMX.Setup_test -e --silentwinget uninstall --id PMX.Setup_test -e --silentBy installer
64-bit · MSI · zh-CN
Silent install
msiexec /i Setup_test.msi /qn /norestartWrite a log
msiexec /i Setup_test.msi /qn /norestart /l*v "%TEMP%\setup-test-install.log"Uninstall
msiexec /x {4B5FFE40-957C-46CC-AC55-C6456968C467} /qn /norestart- MSI product code
- {4B5FFE40-957C-46CC-AC55-C6456968C467}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B5FFE40-957C-46CC-AC55-C6456968C467}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-setup-test.ps1
$url = 'https://github.com/Drifter011/test/releases/download/RelV0.1/Setup_test.msi'
$sha256 = 'EBC5743FE6C6CB99FA6ABD5B694B72738C6D6B331A40DC0012C7FB67952F57AB'
$file = Join-Path $env:TEMP 'Setup_test.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