用于免交互安装CodeBuddy、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id Tencent.CodeBuddy -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Tencent.CodeBuddy -e --silentwinget uninstall --id Tencent.CodeBuddy -e --silent按安装包
64位 · EXE(Inno Setup) · 仅当前用户
静默安装
CodeBuddy-win32-x64-user-4.12.2.41207131-425ab70e.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自定义安装目录
CodeBuddy-win32-x64-user-4.12.2.41207131-425ab70e.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\codebuddy"- 卸载注册表项
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CC6B787D-37A0-49E8-AE24-8559A032BE0C}_is1
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-codebuddy.ps1
$url = 'https://download.codebuddy.ai/aiide/win32-x64-user/CodeBuddy-win32-x64-user-4.12.2.41207131-425ab70e.exe'
$sha256 = '500553BC33E67EEF7C10B91A744463023BC031CF5D7D3B3F29889B1CC279FB2F'
$file = Join-Path $env:TEMP 'CodeBuddy-win32-x64-user-4.12.2.41207131-425ab70e.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