免互動安裝Microsoft Bluetooth Test Platform、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.BTP -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.BTP -e --silentwinget uninstall --id Microsoft.BTP -e --silent依安裝檔
32位元 · MSI · en-US
靜默安裝
msiexec /i BluetoothTestPlatformPack-1.14.0.msi /qn /norestart寫入記錄檔
msiexec /i BluetoothTestPlatformPack-1.14.0.msi /qn /norestart /l*v "%TEMP%\microsoft-bluetooth-test-platform-install.log"解除安裝
msiexec /x {A9C4A759-0745-4F5F-8AB7-D2767978B824} /qn /norestart- MSI產品代碼
- {A9C4A759-0745-4F5F-8AB7-D2767978B824}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A9C4A759-0745-4F5F-8AB7-D2767978B824}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-microsoft-bluetooth-test-platform.ps1
$url = 'https://download.microsoft.com/download/e/e/e/eeed3cd5-bdbd-47db-9b8e-ca9d2df2cd29/BluetoothTestPlatformPack-1.14.0.msi'
$sha256 = '0DF5A3E3AEDE62770333FAB8FD2E044FC3BD6C891226F2087698291E7BAD69CA'
$file = Join-Path $env:TEMP 'BluetoothTestPlatformPack-1.14.0.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