WinGPGを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Scand.WinGPG -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Scand.WinGPG -e --silentwinget uninstall --id Scand.WinGPG -e --silentインストーラー別
64ビット · EXE(Inno Setup) · すべてのユーザー
サイレントインストール
WinGPG-2.0-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
WinGPG-2.0-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\wingpg"- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinGPG_is1
32ビット · EXE(Inno Setup) · すべてのユーザー
サイレントインストール
WinGPG-2.0-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
WinGPG-2.0-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\wingpg"- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WinGPG_is1
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-wingpg.ps1
$url = 'https://s3.us-east-1.amazonaws.com/assets.scand.com/WinGPG/WinGPG-2.0-setup.exe'
$sha256 = 'AB010F160446052E7A9504828028F46C4BEE68D22510D3513F44A06E863975E6'
$file = Join-Path $env:TEMP 'WinGPG-2.0-setup.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-wingpg.ps1
$url = 'https://s3.us-east-1.amazonaws.com/assets.scand.com/WinGPG/WinGPG-2.0-setup.exe'
$sha256 = 'AB010F160446052E7A9504828028F46C4BEE68D22510D3513F44A06E863975E6'
$file = Join-Path $env:TEMP 'WinGPG-2.0-setup.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait