免互動安裝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.13.0_x64-setup.exe /S自訂安裝資料夾
Gitmun_0.13.0_x64-setup.exe /S /D=C:\Apps\gitmun- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gitmun
- 安裝資料夾
- %LocalAppData%\Gitmun
- DisplayVersion
- 0.13.0
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i Gitmun_0.13.0_x64.msi /qn /norestart寫入記錄檔
msiexec /i Gitmun_0.13.0_x64.msi /qn /norestart /l*v "%TEMP%\gitmun-install.log"解除安裝
msiexec /x {0656FB63-AACB-439B-BC83-C8F03C8E59E3} /qn /norestart- MSI產品代碼
- {0656FB63-AACB-439B-BC83-C8F03C8E59E3}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0656FB63-AACB-439B-BC83-C8F03C8E59E3}
- UpgradeCode
- {CFD38D6F-06D8-500B-8162-2815A511EBAF}
- 安裝資料夾
- %ProgramFiles%/Gitmun
- DisplayVersion
- 0.13.0
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-gitmun.ps1
$url = 'https://github.com/cst8t/gitmun/releases/download/v0.13.0/Gitmun_0.13.0_x64-setup.exe'
$sha256 = '65A379303CC1262FF4E4FE921C74B0E58A8964C51F13EA004590201E6B779253'
$file = Join-Path $env:TEMP 'Gitmun_0.13.0_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.13.0/Gitmun_0.13.0_x64.msi'
$sha256 = 'C2434F4766DD7EF58E8EAFC16F38EF2276E936F882CE06FE4C057D4496F6829E'
$file = Join-Path $env:TEMP 'Gitmun_0.13.0_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