Find a better way to distribute personal files. #71

This commit is contained in:
Michael H.G. Schmidt 2022-12-30 14:53:45 +01:00
parent c998c83653
commit 82be181f46
7 changed files with 48 additions and 35 deletions

View File

@ -5,28 +5,12 @@ if %ERRORLEVEL% neq 0 exit /b
set OPT=..\optional set OPT=..\optional
set SOFTWARE=..\software set SOFTWARE=..\software
set MSI=openvpn-setup.msi 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% ( if NOT EXIST %SOFTWARE%\%MSI% (
echo ERROR: %SOFTWARE%\%MSI% not found! echo ERROR: %SOFTWARE%\%MSI% not found!
exit /b exit /b
) )
rem ===================
rem CONFIGFILE CHECK
rem ===================
if NOT EXIST %SETTINGS% (
echo.
echo WARNING: %SETTINGS% NOT FOUND
echo.
) else (
call %SETTINGS%
)
echo ####### %0 ####### echo ####### %0 #######
echo installing OpenVPN ... echo installing OpenVPN ...
@ -43,14 +27,6 @@ echo refreshing desktop (W10 style) ...
ie4uinit.exe -show ie4uinit.exe -show
timeout /nobreak 5 timeout /nobreak 5
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 ####### echo ####### %0 #######
pause pause

View File

@ -7,4 +7,6 @@ set bgcol_R=3
set bgcol_G=131 set bgcol_G=131
set bgcol_B=135 set bgcol_B=135
set explorer_quick_access=1 set explorer_quick_access=1
set gitserver=gitea.exabyte.systems
set gitrepo=personal

View File

@ -3,7 +3,6 @@
set TOOLS=c:\tools set TOOLS=c:\tools
set SOFTWARE=..\software set SOFTWARE=..\software
set T=c:\TEMP set T=c:\TEMP
set WINSCPINI=..\personal\winscp.ini
echo ####### %0 ####### echo ####### %0 #######
@ -125,10 +124,6 @@ echo.
echo WinSCP echo WinSCP
move /Y %T%\winscp\*.exe %TOOLS% move /Y %T%\winscp\*.exe %TOOLS%
rd /S /Q %T%\winscp rd /S /Q %T%\winscp
if EXIST %WINSCPINI% (
echo copying WinSCP ini file ...
copy /Y %WINSCPINI% %TOOLS%
)
echo. echo.
echo WUB - Windows update blocker echo WUB - Windows update blocker

View File

@ -1,5 +1,5 @@
@echo off @echo off
set FTPSETTINGS=..\personal\ftpsettings.cmd set FTPSETTINGS=..\company\ftpsettings.cmd
rem =================== rem ===================
rem CONFIGFILE CHECK rem CONFIGFILE CHECK

View File

@ -1,5 +1,5 @@
@echo off @echo off
set FTPSETTINGS=..\personal\ftpsettings.cmd set FTPSETTINGS=..\company\ftpsettings.cmd
rem =================== rem ===================
rem CONFIGFILE CHECK rem CONFIGFILE CHECK

View File

@ -1,5 +1,5 @@
@echo off @echo off
set FTPSETTINGS=..\personal\ftpsettings.cmd set FTPSETTINGS=..\company\ftpsettings.cmd
rem =================== rem ===================
rem CONFIGFILE CHECK rem CONFIGFILE CHECK

View File

@ -5,12 +5,52 @@ rem GLOBAL VARS
rem =================== rem ===================
set TOOLS=c:\tools set TOOLS=c:\tools
set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done
set SETTINGS=%TOOLS%\scripts\settings.cmd
rem already done ? rem already done ?
if EXIST %PERSONALFILES_DONE% GOTO END if EXIST %PERSONALFILES_DONE% (
echo.
echo This was already DONE!
echo please remove the file [ %PERSONALFILES_DONE% ] to re-execute this!
GOTO END
)
echo ####### %0 ####### echo ####### %0 #######
rem ===================
rem CONFIGFILE CHECK
rem ===================
if NOT EXIST %SETTINGS% (
echo.
echo WARNING: %SETTINGS% NOT FOUND
echo.
) else (
call %SETTINGS%
)
echo ++++++++++++++++++
echo USERNAME=%USERNAME%
echo USERPROFILE=%USERPROFILE%
echo gitserver=%windows_updates%
echo gitrepo=%gitrepo%
echo ++++++++++++++++++
echo.
rem GIT folder anmd REPO ...
echo Creating folder %USERPROFILE%\workspace\git ...
mkdir %USERPROFILE%\workspace\git 1>nul 2>nul
if NOT exist %USERPROFILE%\workspace\git (
echo ERROR: cannot create folder [ %USERPROFILE%\workspace\git ] !
echo ####### %0 #######
exit /b
)
echo cloning GIT repository ...
cd %USERPROFILE%\workspace\git
git clone https://%USERNAME%@%gitserver%/%USERNAME%/%gitrepo%.git
echo copying ini file for TOTALCOMMANDER ... echo copying ini file for TOTALCOMMANDER ...
if EXIST %TOOLS%\personal\WINCMD.ini ( if EXIST %TOOLS%\personal\WINCMD.ini (
copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER
@ -36,6 +76,6 @@ if EXIST %TOOLS%\personal\gitconfig (
rem create a statusfile (this codeblock must be executed only once per user) ... rem create a statusfile (this codeblock must be executed only once per user) ...
echo 1 >%PERSONALFILES_DONE% echo 1 >%PERSONALFILES_DONE%
:END
echo ####### %0 ####### echo ####### %0 #######
:END