免互動安裝Parsec、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Parsec.Parsec -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Parsec.Parsec -e --silentwinget uninstall --id Parsec.Parsec -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者 · en-US
靜默安裝
parsec-windows.exe /silent /norun /nocleanuser自訂安裝資料夾
parsec-windows.exe /silent /norun /nocleanuser /D=C:\Apps\parsec- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Parsec
- 安裝資料夾
- %ProgramFiles%\Parsec
- DisplayVersion
- 150-104a
64位元 · EXE(NSIS) · 所有使用者 · en-US
靜默安裝
parsec-windows.exe /silent /norun /nocleanuser自訂安裝資料夾
parsec-windows.exe /silent /norun /nocleanuser /D=C:\Apps\parsec- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Parsec
- 安裝資料夾
- %ProgramFiles%\Parsec
- DisplayVersion
- 150-104a
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-parsec.ps1
$url = 'https://builds.parsec.app/package/parsec-windows.exe'
$sha256 = 'B8A9CD519010666DEF0EF6E119EB42B33B5B811216F34E4F6C8E2E25AC290FBC'
$file = Join-Path $env:TEMP 'parsec-windows.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 '/silent /norun /nocleanuser' -Wait install-parsec.ps1
$url = 'https://builds.parsec.app/package/parsec-windows.exe'
$sha256 = 'B8A9CD519010666DEF0EF6E119EB42B33B5B811216F34E4F6C8E2E25AC290FBC'
$file = Join-Path $env:TEMP 'parsec-windows.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 '/silent /norun /nocleanuser' -Wait