Dependency Agentを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.DependencyAgent -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DependencyAgent -e --silentwinget uninstall --id Microsoft.DependencyAgent -e --silentインストーラー別
64ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
InstallDependencyAgent-Windows.exe /S /RebootMode=manualインストール先を指定
InstallDependencyAgent-Windows.exe /S /RebootMode=manual /D=C:\Apps\dependency-agent- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DependencyAgent
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-dependency-agent.ps1
$url = 'https://da-release-ehacb6gnczcma8hc.b01.azurefd.net/public/InstallDependencyAgent-Windows.exe'
$sha256 = 'D07B4FDFDF515589E32B7A68519D92D05D8A6F3AA2D7AEA0D27280C9CB51B22D'
$file = Join-Path $env:TEMP 'InstallDependencyAgent-Windows.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 /RebootMode=manual' -Wait