免互動安裝LiveAgent、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Stack-Cairn.LiveAgent -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Stack-Cairn.LiveAgent -e --silentwinget uninstall --id Stack-Cairn.LiveAgent -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
LiveAgent-v1.3.7-Windows-x64-Setup.exe /S自訂安裝資料夾
LiveAgent-v1.3.7-Windows-x64-Setup.exe /S /D=C:\Apps\liveagent- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\LiveAgent
- 安裝資料夾
- %LocalAppData%\LiveAgent
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i LiveAgent-v1.3.7-Windows-x64.msi /qn /norestart寫入記錄檔
msiexec /i LiveAgent-v1.3.7-Windows-x64.msi /qn /norestart /l*v "%TEMP%\liveagent-install.log"解除安裝
msiexec /x {48C830E2-4AB5-4EE9-BA9E-3743081BD5BC} /qn /norestart- MSI產品代碼
- {48C830E2-4AB5-4EE9-BA9E-3743081BD5BC}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{48C830E2-4AB5-4EE9-BA9E-3743081BD5BC}
- UpgradeCode
- {5D56E0D3-9926-5493-A176-8C01F12BA19A}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-liveagent.ps1
$url = 'https://github.com/Stack-Cairn/LiveAgent/releases/download/v1.3.7/LiveAgent-v1.3.7-Windows-x64-Setup.exe'
$sha256 = '3B9283382BB5939F7DB3CF8B861A53DA595373F5C61492695C8C4D4A9FD6115C'
$file = Join-Path $env:TEMP 'LiveAgent-v1.3.7-Windows-x64-Setup.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 '/S' -Wait install-liveagent.ps1
$url = 'https://github.com/Stack-Cairn/LiveAgent/releases/download/v1.3.7/LiveAgent-v1.3.7-Windows-x64.msi'
$sha256 = '85D52CEF36F0A572631067F70CD5D812634B93E223BA3281CBB053847146451C'
$file = Join-Path $env:TEMP 'LiveAgent-v1.3.7-Windows-x64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait