CCHarnessを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Technicalflight.CCHarness -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Technicalflight.CCHarness -e --silentwinget uninstall --id Technicalflight.CCHarness -e --silentインストーラー別
64ビット · MSI · すべてのユーザー
サイレントインストール
msiexec /i CCHarness_0.2.0_x64_en-US.msi /qn /norestartログを出力
msiexec /i CCHarness_0.2.0_x64_en-US.msi /qn /norestart /l*v "%TEMP%\ccharness-install.log"アンインストール
msiexec /x {F520BA2F-C70B-4650-8DE2-A242FA63937A} /qn /norestart- MSIプロダクトコード
- {F520BA2F-C70B-4650-8DE2-A242FA63937A}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F520BA2F-C70B-4650-8DE2-A242FA63937A}
- UpgradeCode
- {ADB303F8-FBEC-5CCE-92B3-2F3E02D9B9ED}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-ccharness.ps1
$url = 'https://github.com/Technicalflight/CCHarness/releases/download/v0.2.0/CCHarness_0.2.0_x64_en-US.msi'
$sha256 = '0084E3210BD880C1A8F81AB16AC7A3181DC659A2299E38360CF182D97B614270'
$file = Join-Path $env:TEMP 'CCHarness_0.2.0_x64_en-US.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