用于免交互安装DownSample、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id TAPATCH.DownSample -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TAPATCH.DownSample -e --silentwinget uninstall --id TAPATCH.DownSample -e --silent按安装包
64位 · EXE(NSIS) · 所有用户
静默安装
DownSample-Setup-1.0.7.exe /S自定义安装目录
DownSample-Setup-1.0.7.exe /S /D=C:\Apps\downsample- 卸载注册表项
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DownSample
- 安装目录
- %ProgramFiles%\TAPATCH\DownSample
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-downsample.ps1
$url = 'https://tapatch.com/downloads/DownSample-Setup-1.0.7.exe'
$sha256 = '87281F6FC9F9951F0B1E8662C464A4B5EC75E23CADB7322ECB5186AC9E35977D'
$file = Join-Path $env:TEMP 'DownSample-Setup-1.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