Icon Extractorを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id AmN.IconExtractor -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id AmN.IconExtractor -e --silentwinget uninstall --id AmN.IconExtractor -e --silentインストーラー別
64ビット · MSI · en-US
サイレントインストール
msiexec /i icon-extractor-1.0.4-win64.msi /qn /norestartログを出力
msiexec /i icon-extractor-1.0.4-win64.msi /qn /norestart /l*v "%TEMP%\icon-extractor-install.log"アンインストール
msiexec /x {13848D40-7D79-4A1C-85B8-487EB4C6EAB9} /qn /norestart- MSIプロダクトコード
- {13848D40-7D79-4A1C-85B8-487EB4C6EAB9}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{13848D40-7D79-4A1C-85B8-487EB4C6EAB9}
- UpgradeCode
- {D8B51DA0-15EF-4D07-BDF6-4B022570A9C2}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-icon-extractor.ps1
$url = 'https://github.com/amnweb/icon-extractor/releases/download/v1.0.4/icon-extractor-1.0.4-win64.msi'
$sha256 = '0F2F4B1D98E1C6C141E8BB677F04939B636DE5D9897C65FCBBCF75585AC451BF'
$file = Join-Path $env:TEMP 'icon-extractor-1.0.4-win64.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