免互動安裝SecondLoop、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id SecondLoop.SecondLoop -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id SecondLoop.SecondLoop -e --silentwinget uninstall --id SecondLoop.SecondLoop -e --silent依安裝檔
64位元 · MSI · en-US
靜默安裝
msiexec /i SecondLoop-win.msi /qn /norestart寫入記錄檔
msiexec /i SecondLoop-win.msi /qn /norestart /l*v "%TEMP%\secondloop-install.log"解除安裝
msiexec /x {7EAB3CF4-1471-4874-8B21-EE2FAE9F973B} /qn /norestart- MSI產品代碼
- {7EAB3CF4-1471-4874-8B21-EE2FAE9F973B}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7EAB3CF4-1471-4874-8B21-EE2FAE9F973B}
- UpgradeCode
- {8B5A0942-79D3-4B5A-A4E5-3FB906DA63A1}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-secondloop.ps1
$url = 'https://github.com/dale0525/SecondLoop/releases/download/v1.33.0/SecondLoop-win.msi'
$sha256 = '77898EB4AADE325E775ED3FB2388B1A8959707F93243DC9D2E2EC29F98AF76FA'
$file = Join-Path $env:TEMP 'SecondLoop-win.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