用于免交互安装https://basemaster.org、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id WilsonGlasser.BaseMaster -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id WilsonGlasser.BaseMaster -e --silentwinget uninstall --id WilsonGlasser.BaseMaster -e --silent按安装包
64位 · EXE(NSIS) · 仅当前用户 · en-US
静默安装
BaseMaster_0.7.5_x64-setup.exe /S自定义安装目录
BaseMaster_0.7.5_x64-setup.exe /S /D=C:\Apps\https-basemaster-org- 卸载注册表项
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\BaseMaster
- 安装目录
- %LocalAppData%\BaseMaster
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-https-basemaster-org.ps1
$url = 'https://github.com/wilsonglasser/basemaster/releases/download/v0.7.5/BaseMaster_0.7.5_x64-setup.exe'
$sha256 = 'ED450AE29DD438FF6B1E6C789AE152D6EE1D87F0C56A191A1A00701D42F2E6CC'
$file = Join-Path $env:TEMP 'BaseMaster_0.7.5_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