用于免交互安装Gitmun、卸载以及在部署工具中检测安装状态的命令。只列出确定可用的命令:来自清单文件,或来自安装程序技术的官方默认参数。
相关教程: 静默安装参数大全:MSI、NSIS、Inno Setup · 用注册表或PowerShell卸载程序
使用winget
PowerShell
winget install --id cst8t.gitmun -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id cst8t.gitmun -e --silentwinget uninstall --id cst8t.gitmun -e --silent按安装包
64位 · EXE(NSIS) · 仅当前用户
静默安装
Gitmun_0.14.3_x64-setup.exe /S自定义安装目录
Gitmun_0.14.3_x64-setup.exe /S /D=C:\Apps\gitmun- 卸载注册表项
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gitmun
- 安装目录
- %LocalAppData%\Gitmun
- DisplayVersion
- 0.14.3
64位 · MSI · 所有用户
静默安装
msiexec /i Gitmun_0.14.3_x64.msi /qn /norestart输出日志
msiexec /i Gitmun_0.14.3_x64.msi /qn /norestart /l*v "%TEMP%\gitmun-install.log"卸载
msiexec /x {E4EA583C-6602-4E61-9547-14C91722C7B4} /qn /norestart- MSI产品代码
- {E4EA583C-6602-4E61-9547-14C91722C7B4}
- 卸载注册表项
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E4EA583C-6602-4E61-9547-14C91722C7B4}
- UpgradeCode
- {CFD38D6F-06D8-500B-8162-2815A511EBAF}
- 安装目录
- %ProgramFiles%/Gitmun
- DisplayVersion
- 0.14.3
PowerShell:下载、校验、安装
下载官方文件,校验SHA256后静默安装。
install-gitmun.ps1
$url = 'https://github.com/cst8t/gitmun/releases/download/v0.14.3/Gitmun_0.14.3_x64-setup.exe'
$sha256 = '34FE10A1973BBC83121265426F821C996C8EAA86F680C3ECD19FDB8AB49EB231'
$file = Join-Path $env:TEMP 'Gitmun_0.14.3_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 install-gitmun.ps1
$url = 'https://github.com/cst8t/gitmun/releases/download/v0.14.3/Gitmun_0.14.3_x64.msi'
$sha256 = '8657829A647B36B8E3A669C2AF1EB32846932FF6EBCEA0C3ADAA34D63C139460'
$file = Join-Path $env:TEMP 'Gitmun_0.14.3_x64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait