Postimageを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Postimage.Postimage -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Postimage.Postimage -e --silentwinget uninstall --id Postimage.Postimage -e --silentインストーラー別
32ビット · EXE(Inno Setup) · すべてのユーザー · en-US
サイレントインストール
setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\postimage"- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{B8BAF53F-4680-44A4-AF64-9934F924676B}_is1
- インストール先フォルダー
- %ProgramFiles%\Postimage
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-postimage.ps1
$url = 'https://postimages.org/setup.exe'
$sha256 = '5F882BDA4F90E8DBD0E9F1C048B4FD235DB5BB9BA0F70AC046AEF97CF6B6975C'
$file = Join-Path $env:TEMP '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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait