Dangerzoneを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id FreedomofthePressFoundation.Dangerzone -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id FreedomofthePressFoundation.Dangerzone -e --silentwinget uninstall --id FreedomofthePressFoundation.Dangerzone -e --silentインストーラー別
64ビット · MSI · すべてのユーザー
サイレントインストール
msiexec /i Dangerzone-0.11.1.msi /qn /norestartログを出力
msiexec /i Dangerzone-0.11.1.msi /qn /norestart /l*v "%TEMP%\dangerzone-install.log"アンインストール
msiexec /x {B2802F73-9FFE-4281-95BE-9E3F364E378B} /qn /norestart- MSIプロダクトコード
- {B2802F73-9FFE-4281-95BE-9E3F364E378B}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2802F73-9FFE-4281-95BE-9E3F364E378B}
- UpgradeCode
- {12B9695C-965B-4BE0-BC33-21274E809576}
- インストール先フォルダー
- %ProgramFiles%/Dangerzone
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-dangerzone.ps1
$url = 'https://github.com/freedomofpress/dangerzone/releases/download/v0.11.1/Dangerzone-0.11.1.msi'
$sha256 = 'D3CD0DC6173CB184C2A7FE32C5EBDCE93FB8F7F1D3F028ED3AF836C9C73C3594'
$file = Join-Path $env:TEMP 'Dangerzone-0.11.1.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait