用于免交互安装유니콘 HTTPS、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id UnicornSoft.UnicornHTTPS -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id UnicornSoft.UnicornHTTPS -e --silentwinget uninstall --id UnicornSoft.UnicornHTTPS -e --silent按安装包
32位 · EXE(NSIS) · 所有用户 · ko-KR
静默安装
unicorn-https-setup.exe /S自定义安装目录
unicorn-https-setup.exe /S /D=C:\Apps\https- 卸载注册表项
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Unicorn HTTPS
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-https.ps1
$url = 'https://unicornhttps-production.s3.ap-northeast-2.amazonaws.com/unicornhttps/v1/hello/windows/unicorn-https-setup.exe'
$sha256 = 'D2C1D56DBB1BF331F2E7F50FDFECDA9FE89FA8BAAC2732A080253F71294632F9'
$file = Join-Path $env:TEMP 'unicorn-https-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