免互動安裝USBTrace、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id SysNucleus.USBTrace -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id SysNucleus.USBTrace -e --silentwinget uninstall --id SysNucleus.USBTrace -e --silent依安裝檔
64位元 · ZIP · 所有使用者 · en-US
靜默安裝
usbtrace-x64.zip /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USBTrace_is1
- 安裝資料夾
- %ProgramFiles%\USBTrace
32位元 · ZIP · 所有使用者 · en-US
靜默安裝
usbtrace-x86.zip /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\USBTrace_is1
- 安裝資料夾
- %ProgramFiles%\USBTrace
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-usbtrace.ps1
$url = 'https://www.sysnucleus.com/usbtrace-x64.zip'
$sha256 = '8E17AE30D7A40DCD2D7365F98E2C0130F893C8413F8834734123886CEA991320'
$file = Join-Path $env:TEMP 'usbtrace-x64.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-usbtrace.ps1
$url = 'https://www.sysnucleus.com/usbtrace-x86.zip'
$sha256 = '710E5C971A609425E130E4AA06AC6316D83AB08861F67256A8AA11B4076218CA'
$file = Join-Path $env:TEMP 'usbtrace-x86.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait