免互動安裝Servo、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Servo.Servo -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Servo.Servo -e --silentwinget uninstall --id Servo.Servo -e --silent依安裝檔
64位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
servo-x86_64-windows-msvc.exe /quiet /norestart解除安裝
msiexec /x {341F1826-D860-4ED6-B7B2-EEDF7E7610C6} /qn /norestart- MSI產品代碼
- {341F1826-D860-4ED6-B7B2-EEDF7E7610C6}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{341F1826-D860-4ED6-B7B2-EEDF7E7610C6}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-servo.ps1
$url = 'https://github.com/servo/servo/releases/download/v0.7.0/servo-x86_64-windows-msvc.exe'
$sha256 = '0731012A33C876CFE8EAE26CBB68FD532DA42B585A70240820EB3D56169711A1'
$file = Join-Path $env:TEMP 'servo-x86_64-windows-msvc.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 '/quiet /norestart' -Wait