免互動安裝ShareSync、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Serverdata.ShareSync -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Serverdata.ShareSync -e --silentwinget uninstall --id Serverdata.ShareSync -e --silent依安裝檔
64位元 · EXE · 所有使用者
靜默安裝
ShareSyncSetup-3.50.7.exe /exenoui /quiet /norestart解除安裝
msiexec /x {B9372F84-CB0D-4083-9E45-6641E10E7114} /qn /norestart- MSI產品代碼
- {B9372F84-CB0D-4083-9E45-6641E10E7114}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B9372F84-CB0D-4083-9E45-6641E10E7114}
- UpgradeCode
- {1db2714d-c299-4458-a4a0-2174f5c5c8ce}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-sharesync.ps1
$url = 'https://sharesync.serverdata.net/installers/Sync-WindowsApp/ShareSyncSetup-3.50.7.exe'
$sha256 = 'E932F15390E4ACAD3B94F697F27B65A03CFE7E39BCC540B0ABF3ABD517C04787'
$file = Join-Path $env:TEMP 'ShareSyncSetup-3.50.7.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 '/exenoui /quiet /norestart' -Wait