免互動安裝Tracetool、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Tracetool.Tracetool -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Tracetool.Tracetool -e --silentwinget uninstall --id Tracetool.Tracetool -e --silent依安裝檔
64位元 · EXE(Inno Setup)
靜默安裝
Setup64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
Setup64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\tracetool"32位元 · EXE(Inno Setup)
靜默安裝
Setup32.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
Setup32.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\tracetool"PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-tracetool.ps1
$url = 'https://github.com/capslock66/Tracetool/releases/download/VIEWER_15_0/Setup64.exe'
$sha256 = '500C30E57D5F0EA9590AD13D1E9E49A6EC789EC7925F3C7194747DCD9374E7AF'
$file = Join-Path $env:TEMP 'Setup64.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-tracetool.ps1
$url = 'https://github.com/capslock66/Tracetool/releases/download/VIEWER_15_0/Setup32.exe'
$sha256 = '239D026B66CE8CCAF5260580AD5B6BE0F7CFD9AD4AFD201056C080448CC89D6E'
$file = Join-Path $env:TEMP 'Setup32.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait