Graylog Sidecarを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id GraylogInc.GraylogSidecar -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GraylogInc.GraylogSidecar -e --silentwinget uninstall --id GraylogInc.GraylogSidecar -e --silentインストーラー別
64ビット · MSI · 現在のユーザー · en-US
サイレントインストール
msiexec /i graylog-sidecar-1.5.6-1.msi /qn /norestartログを出力
msiexec /i graylog-sidecar-1.5.6-1.msi /qn /norestart /l*v "%TEMP%\graylog-sidecar-install.log"アンインストール
msiexec /x {1B35F5F3-E528-4E03-B286-7BE2F3D98C04} /qn /norestart- MSIプロダクトコード
- {1B35F5F3-E528-4E03-B286-7BE2F3D98C04}
- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1B35F5F3-E528-4E03-B286-7BE2F3D98C04}
- UpgradeCode
- {716878B0-190F-42A5-A31A-793621AB888E}
- インストール先フォルダー
- %ProgramFiles%/Graylog/sidecar
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-graylog-sidecar.ps1
$url = 'https://github.com/Graylog2/collector-sidecar/releases/download/1.5.6/graylog-sidecar-1.5.6-1.msi'
$sha256 = '819FC46A98EB560BED03F6BADBFEFDFC8B03C50C9B858A3773F928E2DBCC551B'
$file = Join-Path $env:TEMP 'graylog-sidecar-1.5.6-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