免互動安裝DevPod、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id LoftLabs.DevPod -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id LoftLabs.DevPod -e --silentwinget uninstall --id LoftLabs.DevPod -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
DevPod_0.6.15_x64-setup.exe /S自訂安裝資料夾
DevPod_0.6.15_x64-setup.exe /S /D=C:\Apps\devpod- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DevPod
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i DevPod_windows_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i DevPod_windows_x64_en-US.msi /qn /norestart /l*v "%TEMP%\devpod-install.log"解除安裝
msiexec /x {8D08BD5F-A8B8-4145-8885-70BD20F14383} /qn /norestart- MSI產品代碼
- {8D08BD5F-A8B8-4145-8885-70BD20F14383}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8D08BD5F-A8B8-4145-8885-70BD20F14383}
- UpgradeCode
- {9882EA7A-6E48-5328-80C7-60C114AC4048}
- 安裝資料夾
- %ProgramFiles%\DevPod
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-devpod.ps1
$url = 'https://github.com/loft-sh/devpod/releases/download/v0.6.15/DevPod_0.6.15_x64-setup.exe'
$sha256 = '2E60596ECA13CE54333C268D51EF97B841C6C696AAF694EA236ED727AC6FD4C0'
$file = Join-Path $env:TEMP 'DevPod_0.6.15_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-devpod.ps1
$url = 'https://github.com/loft-sh/devpod/releases/download/v0.6.15/DevPod_windows_x64_en-US.msi'
$sha256 = 'BE3F2A9761AB4BEC5AC75B0F9B38523156DFDEAD15A98C47467B89D019C69340'
$file = Join-Path $env:TEMP 'DevPod_windows_x64_en-US.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