From 4e3f1d1c424ceb13a1bff6857e147294d54e3a95 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 5 Sep 2021 11:21:52 +0200 Subject: [PATCH] openvpn script finished --- optional/install-openvpn.cmd | 52 ++++++++++++++++++++++++++++++++++ optional/install-softmaker.cmd | 5 +++- software/optional.csv | 1 + 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 optional/install-openvpn.cmd diff --git a/optional/install-openvpn.cmd b/optional/install-openvpn.cmd new file mode 100644 index 0000000..84ea635 --- /dev/null +++ b/optional/install-openvpn.cmd @@ -0,0 +1,52 @@ +@echo off + +set OPT=..\optional +set SOFTWARE=..\software +set MSI=openvpn-setup.msi +set SETTINGS=..\personal\settings.cmd +set openvpn_configfile=configfile +set capicli="%ProgramFiles(x86)%\OpenVPN Technologies\OpenVPN Client\core\capicli.exe" + +if NOT EXIST %SOFTWARE%\%MSI% ( + echo ERROR: %SOFTWARE%\%MSI% not found! + exit /b +) + +rem =================== +rem CONFIGFILE CHECK +rem =================== + +if NOT EXIST %SETTINGS% ( + echo. + echo WARNING: %SETTINGS% NOT FOUND + echo. +) else ( + call %SETTINGS% +) + + +echo ####### %0 ####### + +echo installing OpenVPN ... +cd %SOFTWARE% +@echo on +msiexec /i %MSI% /q +@echo off +cd %OPT% + +echo removing Desktop icon ... +del /F "%PUBLIC%\Desktop\OpenVPN Connect.lnk" 2>nul + +echo refreshing desktop (W10 style) ... +ie4uinit.exe -show + +rem install configfile from folder personal ... +if EXIST ..\personal\%openvpn_configfile% ( + echo importing OpenVPN configfile ... + %capicli% -f ..\personal\%openvpn_configfile% ImportProfile +) else ( + echo no configfile found! +) + +echo ####### %0 ####### +pause diff --git a/optional/install-softmaker.cmd b/optional/install-softmaker.cmd index 22e2977..ab6038f 100644 --- a/optional/install-softmaker.cmd +++ b/optional/install-softmaker.cmd @@ -20,8 +20,11 @@ if NOT EXIST %SETTINGS% ( echo. echo WARNING: %SETTINGS% NOT FOUND echo. +) else ( + call %SETTINGS% ) + echo ####### %0 ####### cd %SOFTWARE% @@ -107,7 +110,7 @@ if softmaker_license == 0 ( ) else ( echo adding softmaker license ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\SoftMaker\SoftMaker Office 2021" ^ - /v "ProductKey" /d "115081474870" /t REG_SZ /f + /v "ProductKey" /d "%softmaker_license%" /t REG_SZ /f ) echo ####### %0 ####### diff --git a/software/optional.csv b/software/optional.csv index 98e79cb..0c8a6a9 100644 --- a/software/optional.csv +++ b/software/optional.csv @@ -22,3 +22,4 @@ https://swdl.bluejeans.com/desktop-app/win/2.31.114.0/BlueJeans.2.31.114u.msi bl https://www.sonos.com/redir/controller_software_pc sonospc-setup.exe https://download.lenovo.com/consumer/mobiles/rescue_and_smart_assistant_v5.7.0.16_prod_setup.exe motorescue-setup.exe https://github.com/winauth/winauth/releases/download/3.5.1/WinAuth-3.5.1.zip winauth.zip +https://swupdate.openvpn.net/as/clients/openvpn-connect-2.7.1.111_signed.msi openvpn-setup.msi