BTChargeTrayWatcherを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id peterandree.BTChargeTrayWatcher -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id peterandree.BTChargeTrayWatcher -e --silentwinget uninstall --id peterandree.BTChargeTrayWatcher -e --silentインストーラー別
64ビット · EXE · en-US
サイレントインストール
BTChargeTrayWatcher_3.2.0_Setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTARTPowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-btchargetraywatcher.ps1
$url = 'https://github.com/peterandree/BTChargeTrayWatcher/releases/download/v3.2.0/BTChargeTrayWatcher_3.2.0_Setup.exe'
$sha256 = '4D30A2604EDC72458C8F10F2E99A99BDAEB9C1E174ECE91D8D22A117DE24ECA1'
$file = Join-Path $env:TEMP 'BTChargeTrayWatcher_3.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' -Wait