免互動安裝Codex、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id jcv8000.Codex -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id jcv8000.Codex -e --silentwinget uninstall --id jcv8000.Codex -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者 · en-US
靜默安裝
Codex-2.0.5-Setup.exe /S自訂安裝資料夾
Codex-2.0.5-Setup.exe /S /D=C:\Apps\codex- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\47836d5d-d20f-569b-932c-0b3c1a245792
64位元 · EXE(NSIS) · 所有使用者 · en-US
靜默安裝
Codex-2.0.5-Setup.exe /S自訂安裝資料夾
Codex-2.0.5-Setup.exe /S /D=C:\Apps\codex- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\47836d5d-d20f-569b-932c-0b3c1a245792
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-codex.ps1
$url = 'https://github.com/jcv8000/Codex/releases/download/v2.0.5/Codex-2.0.5-Setup.exe'
$sha256 = 'BEFB7340259E178E6E1022883E9541247BA8BC827D52D08FC6F930D24762D0B2'
$file = Join-Path $env:TEMP 'Codex-2.0.5-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-codex.ps1
$url = 'https://github.com/jcv8000/Codex/releases/download/v2.0.5/Codex-2.0.5-Setup.exe'
$sha256 = 'BEFB7340259E178E6E1022883E9541247BA8BC827D52D08FC6F930D24762D0B2'
$file = Join-Path $env:TEMP 'Codex-2.0.5-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