Ordres per instal·lar Agent Git sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id Xidicone.AgentGit -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Xidicone.AgentGit -e --silentwinget uninstall --id Xidicone.AgentGit -e --silentPer instal·lador
64 bits · EXE (Inno Setup) · Tots els usuaris · en-US
Instal·lació silenciosa
agit64-v188.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
agit64-v188.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\agent-git"32 bits · EXE (Inno Setup) · Tots els usuaris · en-US
Instal·lació silenciosa
agit32-v188.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
agit32-v188.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\agent-git"PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-agent-git.ps1
$url = 'https://www.zeusedit.com/winget/agit64-v188.exe'
$sha256 = '3EFDC36BA233E009F2C44EBA7A063B03F83E9548C5A8AA45925B8E0A9A12BC9A'
$file = Join-Path $env:TEMP 'agit64-v188.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-agent-git.ps1
$url = 'https://www.zeusedit.com/winget/agit32-v188.exe'
$sha256 = 'BE246E7786AB0D17B83177878C6F4CB07164FE885D4D59877B58BC0D77DA0F2C'
$file = Join-Path $env:TEMP 'agit32-v188.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait