Kommandon för att installera PolyMC utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med winget
PowerShell
winget install --id PolyMC.PolyMC -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PolyMC.PolyMC -e --silentwinget uninstall --id PolyMC.PolyMC -e --silentPer installationsfil
64-bitars · EXE (NSIS) · Aktuell användare · en-US
Tyst installation
PolyMC-Windows-Setup-amd64-8.1.exe /SEgen mapp
PolyMC-Windows-Setup-amd64-8.1.exe /S /D=C:\Apps\polymc- Avinstallationsnyckel i registret
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PolyMC
- Installationsmapp
- %LocalAppData%\Programs\PolyMC
PowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-polymc.ps1
$url = 'https://github.com/PolyMC/PolyMC/releases/download/8.1/PolyMC-Windows-Setup-amd64-8.1.exe'
$sha256 = '51C2E3D69A446111D356F2E2953D3BAA8B9563D3F4E7F630C1524ECF1735ED63'
$file = Join-Path $env:TEMP 'PolyMC-Windows-Setup-amd64-8.1.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