免互動安裝Visual Controls、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id AcuityBrands.VisualControls -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id AcuityBrands.VisualControls -e --silentwinget uninstall --id AcuityBrands.VisualControls -e --silent依安裝檔
64位元 · ZIP · 所有使用者
靜默安裝
Download.aspx /quiet /norestart解除安裝
msiexec /x {E1520DAF-BE0F-47FC-A12B-F319F77F2FEC} /qn /norestart- MSI產品代碼
- {e1520daf-be0f-47fc-a12b-f319f77f2fec}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{e1520daf-be0f-47fc-a12b-f319f77f2fec}
- UpgradeCode
- {7FD69ED7-722E-4AF3-B48B-81EDE198680E}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-visual-controls.ps1
$url = 'https://www.visual-3d.com/Tools/Download.aspx?file=vc-releases-production'
$sha256 = '79484F59292BA1DB98780D0CA68C31CCE8118519B50D6349833A68A96BCAD54F'
$file = Join-Path $env:TEMP 'Download.aspx'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/quiet /norestart' -Wait