免互動安裝CC One、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Buktal.CCOne -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Buktal.CCOne -e --silentwinget uninstall --id Buktal.CCOne -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
CC.One_2.3.0_x64-setup.exe /S自訂安裝資料夾
CC.One_2.3.0_x64-setup.exe /S /D=C:\Apps\cc-one- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CC One
- 安裝資料夾
- %LocalAppData%\CC One
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i CC.One_2.3.0_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i CC.One_2.3.0_x64_en-US.msi /qn /norestart /l*v "%TEMP%\cc-one-install.log"解除安裝
msiexec /x {BD05618C-9079-4CFE-B17C-DEB0690F9616} /qn /norestart- MSI產品代碼
- {BD05618C-9079-4CFE-B17C-DEB0690F9616}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BD05618C-9079-4CFE-B17C-DEB0690F9616}
- UpgradeCode
- {A1AFD819-567E-5D53-BD68-F1DC101E6A07}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-cc-one.ps1
$url = 'https://github.com/Buktal/cc-one/releases/download/v2.3.0/CC.One_2.3.0_x64-setup.exe'
$sha256 = '2018D7C62E5D6F8EB11007B8D7A7CBA07045F913832068A97A7C35F21629B234'
$file = Join-Path $env:TEMP 'CC.One_2.3.0_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-cc-one.ps1
$url = 'https://github.com/Buktal/cc-one/releases/download/v2.3.0/CC.One_2.3.0_x64_en-US.msi'
$sha256 = '18F87ABA3C33608A842B0C6C73E63066193E589033B63608058EB1AD3B4F0B1C'
$file = Join-Path $env:TEMP 'CC.One_2.3.0_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