免互動安裝Rnp、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id r12f.Rnp -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id r12f.Rnp -e --silentwinget uninstall --id r12f.Rnp -e --silent依安裝檔
64位元 · MSIX · 僅目前使用者 · en-US
靜默安裝
Add-AppxPackage -Path rnp.0.1.146.main.windows.x64.msix解除安裝
Get-AppxPackage -Name R12f.R12f.Rnp | Remove-AppxPackageARM64 · MSIX · 僅目前使用者 · en-US
靜默安裝
Add-AppxPackage -Path rnp.0.1.146.main.windows.arm64.msix解除安裝
Get-AppxPackage -Name R12f.R12f.Rnp | Remove-AppxPackage32位元 · MSIX · 僅目前使用者 · en-US
靜默安裝
Add-AppxPackage -Path rnp.0.1.146.main.windows.x86.msix解除安裝
Get-AppxPackage -Name R12f.R12f.Rnp | Remove-AppxPackagePowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-rnp.ps1
$url = 'https://github.com/r12f/rnp/releases/download/0.1.146.main/rnp.0.1.146.main.windows.x64.msix'
$sha256 = 'FCDC59F7453920A3C5F08B37A162E184A28CF1110686551D6920F518F42509B3'
$file = Join-Path $env:TEMP 'rnp.0.1.146.main.windows.x64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-rnp.ps1
$url = 'https://github.com/r12f/rnp/releases/download/0.1.146.main/rnp.0.1.146.main.windows.arm64.msix'
$sha256 = 'F8514BFBD9E834C862A9EFC9A6E15DBE0B8070FE5DCF62E86A642D3361E99B2D'
$file = Join-Path $env:TEMP 'rnp.0.1.146.main.windows.arm64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-rnp.ps1
$url = 'https://github.com/r12f/rnp/releases/download/0.1.146.main/rnp.0.1.146.main.windows.x86.msix'
$sha256 = 'FC969BA6CA79CAE1D30880FC7A50BE9CF86C649081DD9F0746DA6A7D64E26888'
$file = Join-Path $env:TEMP 'rnp.0.1.146.main.windows.x86.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file