免互動安裝CP Editor、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id CPEditor.CPEditor -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id CPEditor.CPEditor -e --silentwinget uninstall --id CPEditor.CPEditor -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\cp-editor"- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01D77782-3A40-44F0-BD36-59626998F4EE}_is1
64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\cp-editor"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01D77782-3A40-44F0-BD36-59626998F4EE}_is1
32位元 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\cp-editor"- 解除安裝登錄機碼
- HKCU\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{01D77782-3A40-44F0-BD36-59626998F4EE}_is1
32位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\cp-editor"- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{01D77782-3A40-44F0-BD36-59626998F4EE}_is1
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-cp-editor.ps1
$url = 'https://github.com/cpeditor/cpeditor/releases/download/7.1.2/cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe'
$sha256 = '7065910388474984439B7D5B2AF4380325800D6728C0FB32AAA88C59D14A0B8E'
$file = Join-Path $env:TEMP 'cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-cp-editor.ps1
$url = 'https://github.com/cpeditor/cpeditor/releases/download/7.1.2/cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.exe'
$sha256 = '7065910388474984439B7D5B2AF4380325800D6728C0FB32AAA88C59D14A0B8E'
$file = Join-Path $env:TEMP 'cpeditor-7.1.2-windows-x64-setup-with-gcc-15.2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-cp-editor.ps1
$url = 'https://github.com/cpeditor/cpeditor/releases/download/7.1.2/cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe'
$sha256 = 'BAF1FDEA73C084FA6596641EDE94F78AEC44C0F3A3CDC83EC25510A4743FC73C'
$file = Join-Path $env:TEMP 'cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-cp-editor.ps1
$url = 'https://github.com/cpeditor/cpeditor/releases/download/7.1.2/cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.exe'
$sha256 = 'BAF1FDEA73C084FA6596641EDE94F78AEC44C0F3A3CDC83EC25510A4743FC73C'
$file = Join-Path $env:TEMP 'cpeditor-7.1.2-windows-x86-setup-with-gcc-15.2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait