scooperを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
インストーラー別
CPU共通 · MSI
サイレントインストール
msiexec /i Scooper-1.3.1.msi /qn /norestartログを出力
msiexec /i Scooper-1.3.1.msi /qn /norestart /l*v "%TEMP%\scooper-install.log"PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-scooper.ps1
$url = 'https://github.com/windedge/Scooper/releases/download/v1.3.1/Scooper-1.3.1.msi'
$sha256 = '33658FF6D758724AB3A2E782549677B3553165A3E850760A1CEBE3156D6A7CFD'
$file = Join-Path $env:TEMP 'Scooper-1.3.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