免互動安裝海龟编辑器 2.0、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Codemao.TurtleEditor.2 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Codemao.TurtleEditor.2 -e --silentwinget uninstall --id Codemao.TurtleEditor.2 -e --silent依安裝檔
64位元 · EXE(NSIS) · zh-CN
靜默安裝
海龟编辑器2-x64-2.7.6.exe /S自訂安裝資料夾
海龟编辑器2-x64-2.7.6.exe /S /D=C:\Apps\2-0- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\e1ba9d4e-183b-55e3-8ea4-355fb927fca9
32位元 · EXE(NSIS) · zh-CN
靜默安裝
海龟编辑器2-x32-2.7.6.exe /S自訂安裝資料夾
海龟编辑器2-x32-2.7.6.exe /S /D=C:\Apps\2-0- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\e1ba9d4e-183b-55e3-8ea4-355fb927fca9
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-2-0.ps1
$url = 'https://static.codemao.cn/turtle/client/release/%E6%B5%B7%E9%BE%9F%E7%BC%96%E8%BE%91%E5%99%A82-x64-2.7.6.exe'
$sha256 = '8F77B1B3E73D2F83511047E07B531DAB7CA5787D33BADE0B88A5B0F6CD6ED692'
$file = Join-Path $env:TEMP '海龟编辑器2-x64-2.7.6.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-2-0.ps1
$url = 'https://static.codemao.cn/turtle/client/release/%E6%B5%B7%E9%BE%9F%E7%BC%96%E8%BE%91%E5%99%A82-x32-2.7.6.exe'
$sha256 = 'BC9E824E485981CC2C321BF8F615316A13989EC5E994436CF89627EC3304D83D'
$file = Join-Path $env:TEMP '海龟编辑器2-x32-2.7.6.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