XCAを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id ChristianHohnstadt.xca -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ChristianHohnstadt.xca -e --silentwinget uninstall --id ChristianHohnstadt.xca -e --silentインストーラー別
64ビット · MSI · すべてのユーザー · en-US
サイレントインストール
msiexec /i xca-2.9.0-win64.msi /qn /norestartログを出力
msiexec /i xca-2.9.0-win64.msi /qn /norestart /l*v "%TEMP%\xca-install.log"アンインストール
msiexec /x {9CD31286-F9BC-476F-8025-05B06EEF7510} /qn /norestart- MSIプロダクトコード
- {9CD31286-F9BC-476F-8025-05B06EEF7510}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9CD31286-F9BC-476F-8025-05B06EEF7510}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-xca.ps1
$url = 'https://github.com/chris2511/xca/releases/download/RELEASE.2.9.0/xca-2.9.0-win64.msi'
$sha256 = 'B26886CFFB0170C4246A09C5E64965FAD9DA601C9A83E6B24AD2EE1B5F173638'
$file = Join-Path $env:TEMP 'xca-2.9.0-win64.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