ImageViewを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id TonyPottier.ImageView -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TonyPottier.ImageView -e --silentwinget uninstall --id TonyPottier.ImageView -e --silentインストーラー別
32ビット · EXE(NSIS) · すべてのユーザー · en-US
サイレントインストール
ImageView_2.4.6_Setup.exe /Sインストール先を指定
ImageView_2.4.6_Setup.exe /S /D=C:\Apps\imageviewPowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-imageview.ps1
$url = 'https://github.com/tonyp7/ImageView/releases/download/v2.4.6/ImageView_2.4.6_Setup.exe'
$sha256 = '7B94D378EBE5F488C8774869DB9974439822BC5D6CE960205A11C56078AA66C7'
$file = Join-Path $env:TEMP 'ImageView_2.4.6_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 '/S' -Wait