Microsoft Report Builderを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.ReportBuilder -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.ReportBuilder -e --silentwinget uninstall --id Microsoft.ReportBuilder -e --silentインストーラー別
64ビット · MSI · en-US
サイレントインストール
msiexec /i ReportBuilder.msi /qn /norestartログを出力
msiexec /i ReportBuilder.msi /qn /norestart /l*v "%TEMP%\microsoft-report-builder-install.log"アンインストール
msiexec /x {2A6CA408-009B-407F-9CBB-8EF5640F75B5} /qn /norestart- MSIプロダクトコード
- {2A6CA408-009B-407F-9CBB-8EF5640F75B5}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A6CA408-009B-407F-9CBB-8EF5640F75B5}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-report-builder.ps1
$url = 'https://download.microsoft.com/download/5/E/B/5EB40744-DC0A-47C0-8B0A-1830E74D3C23/ReportBuilder.msi'
$sha256 = '77EFD0D45ED03DB04501A1561A431C60BC69DEFA8F9A730EBFD5916EC6BF2469'
$file = Join-Path $env:TEMP 'ReportBuilder.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