27 lines
987 B
Batchfile
27 lines
987 B
Batchfile
:: ------------------------------------------------------------
|
|
:: 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
|
|
set VERS=2.6.14
|
|
set BASEURL=https://swupdate.openvpn.org/community/releases
|
|
set PROG=OpenVPN-%VERS%-I004-amd64.msi
|
|
|
|
:: --- Lade Datei herunter
|
|
echo Starte Download.
|
|
curl -kLSsf %BASEURL%/%PROG% -o %SAVEPATH%\%PROG%
|
|
if %ERRORLEVEL% EQU 0 (echo Download OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!)
|
|
|
|
:: --- Silent-Installation des Programms:
|
|
echo Starte Installation.
|
|
%SYSTEMDRIVE%\windows\system32\msiexec /i "%PROG%" /passive /l %SAVEPATH%\%PROG%.log
|
|
if %ERRORLEVEL% EQU 0 (echo Installation OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!)
|
|
|
|
|
|
|