Gotify Trayを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id serid.GotifyTray -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id serid.GotifyTray -e --silentwinget uninstall --id serid.GotifyTray -e --silentインストーラー別
64ビット · EXE(Inno Setup)
サイレントインストール
gotify-tray-installer-win.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
gotify-tray-installer-win.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gotify-tray"PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-gotify-tray.ps1
$url = 'https://github.com/seird/gotify-tray/releases/download/0.5.3/gotify-tray-installer-win.exe'
$sha256 = '6BFCEC610AFCE7918743ACB8C03DA2A639B4A353321D7371A1F7F8D76001C8D7'
$file = Join-Path $env:TEMP 'gotify-tray-installer-win.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