免互動安裝Git Extensions、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id GitExtensionsTeam.GitExtensions -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GitExtensionsTeam.GitExtensions -e --silentwinget uninstall --id GitExtensionsTeam.GitExtensions -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i GitExtensions-x64-7.2.1.7-0aea2d6df.msi /qn /norestart寫入記錄檔
msiexec /i GitExtensions-x64-7.2.1.7-0aea2d6df.msi /qn /norestart /l*v "%TEMP%\git-extensions-install.log"解除安裝
msiexec /x {BF76B530-3522-436E-9F87-25DF0FEF51E4} /qn /norestart- MSI產品代碼
- {BF76B530-3522-436E-9F87-25DF0FEF51E4}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BF76B530-3522-436E-9F87-25DF0FEF51E4}
- UpgradeCode
- {140E80EA-5053-42DC-AB0E-6FF0E49E6BCF}
- 安裝資料夾
- %ProgramFiles%\GitExtensions
ARM64 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i GitExtensions-arm64-7.2.1.7-0aea2d6df.msi /qn /norestart寫入記錄檔
msiexec /i GitExtensions-arm64-7.2.1.7-0aea2d6df.msi /qn /norestart /l*v "%TEMP%\git-extensions-install.log"解除安裝
msiexec /x {F263885F-D242-4FF2-896E-A7E75B9CF29D} /qn /norestart- MSI產品代碼
- {F263885F-D242-4FF2-896E-A7E75B9CF29D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F263885F-D242-4FF2-896E-A7E75B9CF29D}
- UpgradeCode
- {140E80EA-5053-42DC-AB0E-6FF0E49E6BCF}
- 安裝資料夾
- %ProgramFiles%\GitExtensions
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-git-extensions.ps1
$url = 'https://github.com/gitextensions/gitextensions/releases/download/v7.2.1/GitExtensions-x64-7.2.1.7-0aea2d6df.msi'
$sha256 = '3D8043608FCB211B1EE26250DD1D5F0C596C82891230E8EA22549E3012C32475'
$file = Join-Path $env:TEMP 'GitExtensions-x64-7.2.1.7-0aea2d6df.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 install-git-extensions.ps1
$url = 'https://github.com/gitextensions/gitextensions/releases/download/v7.2.1/GitExtensions-arm64-7.2.1.7-0aea2d6df.msi'
$sha256 = '4196DABEB9B3EA1E6D067C6BEED80021E41EB7F5627A032B7074D25AA952DAAB'
$file = Join-Path $env:TEMP 'GitExtensions-arm64-7.2.1.7-0aea2d6df.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