免互動安裝GpgFrontend、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Saturneric.GpgFrontend -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Saturneric.GpgFrontend -e --silentwinget uninstall --id Saturneric.GpgFrontend -e --silent依安裝檔
64位元 · MSIX · en-US
靜默安裝
Add-AppxPackage -Path GpgFrontend-2.2.4-windows-x86_64.msix解除安裝
msiexec /x {64099272-619C-4647-B9E6-BE3183CA3704} /qn /norestart- MSI產品代碼
- {64099272-619C-4647-B9E6-BE3183CA3704}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{64099272-619C-4647-B9E6-BE3183CA3704}
- 安裝資料夾
- %ProgramFiles%\WindowsApps\com.bktus.GpgFrontend_2.2.4.0_x64__02yyyzadb3ys8
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-gpgfrontend.ps1
$url = 'https://github.com/saturneric/GpgFrontend/releases/download/v2.2.4/GpgFrontend-2.2.4-windows-x86_64.msix'
$sha256 = '9A87AA0EB09EC2870E5EAE031FC5BF79438F61F9A60AB0EA8C3D01B28980195E'
$file = Join-Path $env:TEMP 'GpgFrontend-2.2.4-windows-x86_64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file