rem ------------------------------------------------------------
rem Installationsroutine
rem ------------------------------------------------------------

rem --- Option: Download in ein temporäres Verzeichnis
rem --- Kann für z.B. für GLPI abgeschaltet werden
set SAVEPATH=%SYSTEMDRIVE%\TEMP\install
MKDIR %SAVEPATH% & CD /D %SAVEPATH%

rem --- Download Basis-URL, Dateiname und TEMP-Verzeichnis
set VERSION=24.8.4
set ARCH1=x86_64
set ARCH2=x86-64
set BASEURL=https://download.documentfoundation.org/libreoffice/stable/%VERSION%/win/%ARCH1%
set PROG=LibreOffice_%VERSION%_Win_%ARCH2%.msi
set HLPR=LibreOffice_%VERSION%_Win_%ARCH2%_helppack_de.msi
rem --- Lade Installationsdatei herunter
curl -kL %BASEURL%/%PROG% -o %SAVEPATH%\%PROG%
rem --- Lade Hilfepack herunter
curl -kL %BASEURL%/%HLPR% -o %SAVEPATH%\%HLPR%

rem --- Silent-Installation des Programms:
msiexec /i %PROG% /qn /norestart PRODUCTLANGUAGE=1031 LANGUAGE=1031 RebootYesNo=No QUICKSTART=0 UI_LANGS=de ADDLOCAL=ALL /l %SAVEPATH%\%PROG%.log
msiexec /i %HLPR% /qn /norestart 