免互動安裝3CX、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id 3CX.Softphone -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id 3CX.Softphone -e --silentwinget uninstall --id 3CX.Softphone -e --silent依安裝檔
64位元 · MSIX
靜默安裝
Add-AppxPackage -Path 3CX.msix解除安裝
Get-AppxPackage -Name 3CXDMCC.3CX | Remove-AppxPackagePowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-3cx.ps1
$url = 'https://downloads-global.3cx.com/downloads/3cxsoftphone/3CX.msix'
$sha256 = 'D2756F8449201C218378DA2B502E681817F1D8E6C28006478B64C239B0309930'
$file = Join-Path $env:TEMP '3CX.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file