Polecenia do instalacji programu Setup_test bez pytań, do jego usuwania i do wykrywania w narzędziach wdrożeniowych. Polecenie jest podane tylko wtedy, gdy jest pewne: pochodzi z manifestu albo z udokumentowanych ustawień domyślnych technologii instalatora.
Powiązany poradnik: Parametry cichej instalacji: MSI, NSIS, Inno Setup · Odinstalowanie programu przez rejestr lub PowerShell
Przez 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 --silentWedług instalatora
64-bit · MSI · zh-CN
Cicha instalacja
msiexec /i Setup_test.msi /qn /norestartZapis dziennika
msiexec /i Setup_test.msi /qn /norestart /l*v "%TEMP%\setup-test-install.log"Odinstalowanie
msiexec /x {4B5FFE40-957C-46CC-AC55-C6456968C467} /qn /norestart- Kod produktu MSI
- {4B5FFE40-957C-46CC-AC55-C6456968C467}
- Klucz odinstalowania w rejestrze
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B5FFE40-957C-46CC-AC55-C6456968C467}
PowerShell: pobierz, zweryfikuj, zainstaluj
Pobiera oficjalny plik, sprawdza jego SHA256 i instaluje go po cichu.
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