Utsuを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id titinko.utsu -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id titinko.utsu -e --silentwinget uninstall --id titinko.utsu -e --silentインストーラー別
64ビット · MSI · すべてのユーザー · en-US
サイレントインストール
msiexec /i Utsu-0.4.5.msi /qn /norestartログを出力
msiexec /i Utsu-0.4.5.msi /qn /norestart /l*v "%TEMP%\utsu-install.log"アンインストール
msiexec /x {6C7D956C-EABE-3960-98E7-F8968D5936DE} /qn /norestart- MSIプロダクトコード
- {6C7D956C-EABE-3960-98E7-F8968D5936DE}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6C7D956C-EABE-3960-98E7-F8968D5936DE}
- UpgradeCode
- {4055DBD3-6DB2-396F-8F3C-7D5BEC37B8CD}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-utsu.ps1
$url = 'https://github.com/titinko/utsu/releases/download/v0.4.5/Utsu-0.4.5.msi'
$sha256 = 'DB539E9AE85719C3DE751CC24B3274F47C767F9C22A0176517535804F2B05E4A'
$file = Join-Path $env:TEMP 'Utsu-0.4.5.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