免互動安裝Visual Lighting、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id AcuityBrands.VisualLighting -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id AcuityBrands.VisualLighting -e --silentwinget uninstall --id AcuityBrands.VisualLighting -e --silent依安裝檔
64位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
VisualLighting2020r2Setup.exe /quiet /norestart解除安裝
msiexec /x {2900D46B-776E-4853-A82A-04DEB22CF03D} /qn /norestart- MSI產品代碼
- {2900d46b-776e-4853-a82a-04deb22cf03d}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2900d46b-776e-4853-a82a-04deb22cf03d}
- UpgradeCode
- {2900d46b-776e-4853-a82a-04deb22cf03d}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-visual-lighting.ps1
$url = 'https://abvisual.blob.core.windows.net/visual-lighting/2.11.0164/VisualLighting2020r2Setup.exe'
$sha256 = 'E90FF2C1355B6D5EE537CD6DDA024F2D9989DD485E38A4EA66B8122C7D06CAEE'
$file = Join-Path $env:TEMP 'VisualLighting2020r2Setup.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 '/quiet /norestart' -Wait