免互動安裝xPlatform、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Thorlabs.xPlatform -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Thorlabs.xPlatform -e --silentwinget uninstall --id Thorlabs.xPlatform -e --silent依安裝檔
32位元 · ZIP · 所有使用者
靜默安裝
mcls2.zip /S /V/quiet /V/norestart解除安裝
msiexec /x {3FD189BD-AA45-48A7-98F7-4D6D7C4B0B36} /qn /norestart- MSI產品代碼
- {3FD189BD-AA45-48A7-98F7-4D6D7C4B0B36}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3FD189BD-AA45-48A7-98F7-4D6D7C4B0B36}
- UpgradeCode
- {1EB8EB1F-BE1C-4435-BAF4-FE130EE969BE}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-xplatform.ps1
$url = 'https://thin01mstroc282prod.dxcloud.episerver.net/contentassets/9a891aaba96b407db2a1880624af5c1d/mcls2.zip'
$sha256 = 'BEA3CCDD572BB3837DE40DEDCDDBFD154429629CFED5FE8659AE708433E89D8B'
$file = Join-Path $env:TEMP 'mcls2.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 '/S /V/quiet /V/norestart' -Wait