dfetchを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id DFetch-org.DFetch -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id DFetch-org.DFetch -e --silentwinget uninstall --id DFetch-org.DFetch -e --silentインストーラー別
32ビット · MSI · すべてのユーザー · und
サイレントインストール
msiexec /i dfetch-0.14.4-win.msi /qn /norestartログを出力
msiexec /i dfetch-0.14.4-win.msi /qn /norestart /l*v "%TEMP%\dfetch-install.log"アンインストール
msiexec /x {90F074A9-D2A7-42D2-BBFF-E0767AB01CFD} /qn /norestart- MSIプロダクトコード
- {90F074A9-D2A7-42D2-BBFF-E0767AB01CFD}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90F074A9-D2A7-42D2-BBFF-E0767AB01CFD}
- UpgradeCode
- {BDC7DA0D-70C1-4189-BE88-F1BD2DEE3E33}
- インストール先フォルダー
- %ProgramFiles(x86)%/dfetch
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-dfetch.ps1
$url = 'https://github.com/dfetch-org/dfetch/releases/download/0.14.4/dfetch-0.14.4-win.msi'
$sha256 = '50DE7D2E81FDA4F997C1640A99B588AD24B8C96E7232CD7E291B6779313C712C'
$file = Join-Path $env:TEMP 'dfetch-0.14.4-win.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