Insomniaを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Insomnia.Insomnia -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Insomnia.Insomnia -e --silentwinget uninstall --id Insomnia.Insomnia -e --silentインストーラー別
64ビット · EXE · 現在のユーザー
サイレントインストール
Insomnia.Core-13.3.1.exe --silent- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\insomnia
- インストール先フォルダー
- %LocalAppData%\insomnia
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-insomnia.ps1
$url = 'https://github.com/Kong/insomnia/releases/download/core@13.3.1/Insomnia.Core-13.3.1.exe'
$sha256 = 'FF4D012E135DF13CCE4FC9AFEEB50E11CF6D6E616AD22587B246BF9BBEB51522'
$file = Join-Path $env:TEMP 'Insomnia.Core-13.3.1.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 '--silent' -Wait