Commands for installing gitg without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id gnome.gitg -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id gnome.gitg -e --silentwinget uninstall --id gnome.gitg -e --silentBy installer
64-bit · MSI · All users · en-US
Silent install
msiexec /i gitg-x86_64-41.0.msi /qn /norestartWrite a log
msiexec /i gitg-x86_64-41.0.msi /qn /norestart /l*v "%TEMP%\gitg-install.log"Uninstall
msiexec /x {4FD1FE3D-5FFE-44D1-8AF1-CF197E94CAE1} /qn /norestart- MSI product code
- {4FD1FE3D-5FFE-44D1-8AF1-CF197E94CAE1}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4FD1FE3D-5FFE-44D1-8AF1-CF197E94CAE1}
- UpgradeCode
- {090D042C-A0F7-A6BD-A4FB-A1783C491F5B}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-gitg.ps1
$url = 'https://download.gnome.org/binaries/win64/gitg/41/gitg-x86_64-41.0.msi'
$sha256 = '96C4E323607FDA46BDB02698C92B991AAEC882E050DE1DF959E7ACF3993F117C'
$file = Join-Path $env:TEMP 'gitg-x86_64-41.0.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