Diffを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id DBAdminX.Diff -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id DBAdminX.Diff -e --silentwinget uninstall --id DBAdminX.Diff -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー · en-US
サイレントインストール
Diff.Viewer_1.3.0_x64-setup.exe /Sインストール先を指定
Diff.Viewer_1.3.0_x64-setup.exe /S /D=C:\Apps\diff- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Diff Viewer
- インストール先フォルダー
- %LocalAppData%\Diff Viewer
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-diff.ps1
$url = 'https://github.com/ZeroMarker/Diff/releases/download/v1.3.0/Diff.Viewer_1.3.0_x64-setup.exe'
$sha256 = '5BE0A175BD581DAE41BFBDDE4AAFC3067DF8488296CEF364B0A8D70614426348'
$file = Join-Path $env:TEMP 'Diff.Viewer_1.3.0_x64-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