用于免交互安装稿定设计、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id Gaoding.Gaoding -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Gaoding.Gaoding -e --silentwinget uninstall --id Gaoding.Gaoding -e --silent按安装包
64位 · EXE(NSIS) · 仅当前用户
静默安装
gaoding-setup-win-x64-2.0.7.exe /S自定义安装目录
gaoding-setup-win-x64-2.0.7.exe /S /D=C:\Apps\gaoding-gaoding- 卸载注册表项
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\460e433d-086f-5e44-84af-635a2b4a3826
64位 · EXE(NSIS) · 所有用户
静默安装
gaoding-setup-win-x64-2.0.7.exe /S自定义安装目录
gaoding-setup-win-x64-2.0.7.exe /S /D=C:\Apps\gaoding-gaoding- 卸载注册表项
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\460e433d-086f-5e44-84af-635a2b4a3826
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-gaoding-gaoding.ps1
$url = 'https://cdn.dancf.com/gaodingx/clients/stable/gaoding-setup-win-x64-2.0.7.exe'
$sha256 = '3E1FBF60E564DE6A0C522520B0A3DBAD8ACF1CA57B598DE228EC84B70EB628D1'
$file = Join-Path $env:TEMP 'gaoding-setup-win-x64-2.0.7.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-gaoding-gaoding.ps1
$url = 'https://cdn.dancf.com/gaodingx/clients/stable/gaoding-setup-win-x64-2.0.7.exe'
$sha256 = '3E1FBF60E564DE6A0C522520B0A3DBAD8ACF1CA57B598DE228EC84B70EB628D1'
$file = Join-Path $env:TEMP 'gaoding-setup-win-x64-2.0.7.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