Writを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id ibrahemid.Writ -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ibrahemid.Writ -e --silentwinget uninstall --id ibrahemid.Writ -e --silentインストーラー別
64ビット · MSI · 現在のユーザー
サイレントインストール
msiexec /i Writ_1.0.0_x64_en-US.msi /qn /norestart /quietログを出力
msiexec /i Writ_1.0.0_x64_en-US.msi /qn /norestart /quiet /l*v "%TEMP%\writ-install.log"アンインストール
msiexec /x {982865EC-1CD9-411F-BE6B-C2C59F1585A8} /qn /norestart- MSIプロダクトコード
- {982865EC-1CD9-411F-BE6B-C2C59F1585A8}
- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{982865EC-1CD9-411F-BE6B-C2C59F1585A8}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-writ.ps1
$url = 'https://github.com/ibrahemid/writ/releases/download/v1.0.0/Writ_1.0.0_x64_en-US.msi'
$sha256 = '42FFC9F11AB97DCB10C5E5935D8D66182E54A03F8E5C1C11045685AFB9DE39E6'
$file = Join-Path $env:TEMP 'Writ_1.0.0_x64_en-US.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', '/quiet' -Wait