:: ------------------------------------------------------------ :: Installationsroutine :: ------------------------------------------------------------ :: --- Option: Download in ein temporäres Verzeichnis :: --- Kann für z.B. für GLPI abgeschaltet werden set SAVEPATH=%SYSTEMDRIVE%\TEMP\install MKDIR %SAVEPATH% 2> nul & CD /D %SAVEPATH% :: --- Download Basis-URL, Dateiname und TEMP-Verzeichnis :: https://github.com/git-for-windows/git/releases/latest set VERS=2.51.2 set BASEURL=https://github.com/git-for-windows/git/releases/download/v%VERS%.windows.1 set PROG=Git-%VERS%-64-bit.exe :: --- Lade Datei herunter echo Starte Download Version %VERS%. curl -kLSsf %BASEURL%/%PROG% -o %SAVEPATH%\%PROG% if %ERRORLEVEL% EQU 0 (echo Download OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!) :: --- Erzeuge INI-Datei ( echo [Setup] echo Lang=default echo Dir=C:\Program Files\Git echo Group=Git echo NoIcons=0 echo SetupType=default echo Components=gitlfs,assoc,assoc_sh,scalar echo Tasks= echo EditorOption=Notepad++ echo CustomEditorPath= echo DefaultBranchOption= echo PathOption=Cmd echo SSHOption=OpenSSH echo TortoiseOption=false echo CURLOption=OpenSSL echo CRLFOption=CRLFAlways echo BashTerminalOption=MinTTY echo GitPullBehaviorOption=Merge echo UseCredentialManager=Enabled echo PerformanceTweaksFSCache=Enabled echo EnableSymlinks=Disabled echo EnablePseudoConsoleSupport=Disabled echo EnableFSMonitor=Disabled ) > git.ini :: --- Silent-Installation des Programms: echo Starte Installation. %PROG% /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /LOADINF=git.ini if %ERRORLEVEL% EQU 0 (echo Installation OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!)