免互動安裝OpenWorker、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id AndrewNg.OpenWorker -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id AndrewNg.OpenWorker -e --silentwinget uninstall --id AndrewNg.OpenWorker -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
OpenWorker-windows-setup.exe /S自訂安裝資料夾
OpenWorker-windows-setup.exe /S /D=C:\Apps\openworker- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenWorker
- 安裝資料夾
- %LocalAppData%\OpenWorker
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i OpenWorker-windows.msi /qn /norestart寫入記錄檔
msiexec /i OpenWorker-windows.msi /qn /norestart /l*v "%TEMP%\openworker-install.log"解除安裝
msiexec /x {A328C6D3-6FF9-42BF-9732-7B19872F9464} /qn /norestart- MSI產品代碼
- {A328C6D3-6FF9-42BF-9732-7B19872F9464}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A328C6D3-6FF9-42BF-9732-7B19872F9464}
- UpgradeCode
- {EE9E0539-FB13-5B97-9B6E-0C18C65E04BC}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-openworker.ps1
$url = 'https://github.com/andrewyng/openworker/releases/download/v0.3.1/OpenWorker-windows-setup.exe'
$sha256 = 'FAB613ED5565708140FF93514A85A49077F46B9D067BBCDDEC484F32FC9F896B'
$file = Join-Path $env:TEMP 'OpenWorker-windows-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-openworker.ps1
$url = 'https://github.com/andrewyng/openworker/releases/download/v0.3.1/OpenWorker-windows.msi'
$sha256 = 'F5D787DB754F6A13D3A07ED12A1D04A050005659DB9426D147C149710A33E1C2'
$file = Join-Path $env:TEMP 'OpenWorker-windows.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