logic bugfix

This commit is contained in:
Michael H.G. Schmidt 2023-02-23 11:14:36 +01:00
parent 25829578cf
commit 06876d2566
3 changed files with 63 additions and 34 deletions

View File

@ -3,9 +3,10 @@ rem this script is doing most of the work ...
set T=%SystemDrive%\TEMP set T=%SystemDrive%\TEMP
set TOOLS=%SystemDrive%\tools set TOOLS=%SystemDrive%\tools
set SETTINGS=settings.cmd
set SCRIPTS=%TOOLS%\scripts set SCRIPTS=%TOOLS%\scripts
set LOG=%SCRIPTS%\autoconfig.txt set LOG=%SCRIPTS%\autoconfig.txt
set SCRIPT_SETTINGS=%TOOLS%\scripts\settings.cmd
set COMPANY_SETTINGS=%TOOLS%\company\settings.cmd
del /F %LOG% 1>nul 2>nul del /F %LOG% 1>nul 2>nul
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1 if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
@ -14,42 +15,55 @@ shift /1
rem show window with logfile while running scripts ... rem show window with logfile while running scripts ...
start %TOOLS%\logmonitor.exe %LOG% start %TOOLS%\logmonitor.exe %LOG%
rem ===================
rem DEFAULTS
rem ===================
set LANG=en-US
set windows_updates=0
set windows_targetrelease=2009
set logon_logo=0
set install_firefox=0
set install_aerolite=0
set bgcol_R=3
set bgcol_G=131
set bgcol_B=135
set explorer_quick_access=0
set preserve_savedgames_folder=1
set searchdomains=localdomain,fritz.box
set gitserver=github.com
set gitrepo=my_repo_at_github
set start_desktopinfo=0
echo ####### %0 ####### echo ####### %0 #######
date /t date /t
time /t time /t
echo. echo.
echo creating %T% ... rem ===================
mkdir %T% 1>nul 2>nul rem CONFIGFILE CHECKS
rem ===================
echo cd to %SCRIPTS% ... echo.
cd /D %SCRIPTS% echo searching for SCRIPT settings ...
if NOT EXIST %SCRIPT_SETTINGS% (
rem SCRIPT settings ... echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND
if EXIST %SETTINGS% (
echo loading settings ...
call %SETTINGS%
) else ( ) else (
echo WARNING: [ %SETTINGS% ] not found! echo OK. Loading SCRIPT settings ...
echo setting defaults ... call %SCRIPT_SETTINGS%
set LANG=en-US
set windows_updates=0
set windows_targetrelease=2009
set logon_logo=1
set install_firefox=1
set install_aerolite=1
set bgcol_R=3
set bgcol_G=131
set bgcol_B=135
set explorer_quick_access=1
set preserve_savedgames_folder=1
set searchdomains=localdomain,fritz.box
set gitserver=github.com
set gitrepo=my_repo_at_github
) )
echo.
echo searching for COMPANY settings ...
if NOT EXIST %COMPANY_SETTINGS% (
echo INFO: config file %COMPANY_SETTINGS% NOT FOUND
) else (
echo OK. Loading COMPANY settings ...
call %COMPANY_SETTINGS%
)
rem show all the settings ...
echo.
echo ++++++++++++++++++ echo ++++++++++++++++++
echo LANG=%LANG% echo LANG=%LANG%
echo windows_updates=%windows_updates% echo windows_updates=%windows_updates%
@ -65,9 +79,20 @@ echo preserve_savedgames_folder=%preserve_savedgames_folder%
echo searchdomains=%searchdomains% echo searchdomains=%searchdomains%
echo gitserver=%gitserver% echo gitserver=%gitserver%
echo gitrepo=%gitrepo% echo gitrepo=%gitrepo%
echo start_desktopinfo=%start_desktopinfo%
echo ++++++++++++++++++ echo ++++++++++++++++++
echo. echo.
rem ======
rem MAIN
rem ======
echo creating %T% ...
mkdir %T% 1>nul 2>nul
echo cd to %SCRIPTS% ...
cd /D %SCRIPTS%
echo ####################### echo #######################
echo ### UNPACK and COPY ### echo ### UNPACK and COPY ###
echo ####################### echo #######################

View File

@ -15,4 +15,5 @@ set gitrepo=my_repo_at_github
set localadmin=localadmin set localadmin=localadmin
set localadmin_name=Local Administrator set localadmin_name=Local Administrator
set localadmin_password= set localadmin_password=
set start_desktopinfo=1

View File

@ -4,7 +4,7 @@ rem ===================
rem GLOBAL VARS rem GLOBAL VARS
rem =================== rem ===================
set TOOLS=c:\tools set TOOLS=%SystemDrive%\tools
set SCRIPT_SETTINGS=%TOOLS%\scripts\settings.cmd set SCRIPT_SETTINGS=%TOOLS%\scripts\settings.cmd
set COMPANY_SETTINGS=%TOOLS%\company\settings.cmd set COMPANY_SETTINGS=%TOOLS%\company\settings.cmd
set USERCONFIG_DONE="%LOCALAPPDATA%"\.userconfig_done set USERCONFIG_DONE="%LOCALAPPDATA%"\.userconfig_done
@ -20,11 +20,12 @@ set bgcol_R=0
set bgcol_G=0 set bgcol_G=0
set bgcol_B=0 set bgcol_B=0
set LANG=en-US set LANG=en-US
set localadmin= set localadmin=localadmin
set emclient_license=0 set emclient_license=0
set seafile_domain=0 set seafile_domain=0
set install_aerolite=0 set install_aerolite=0
set preserve_savedgames_folder=0 set preserve_savedgames_folder=1
set start_desktopinfo=0
echo ####### %0 ####### echo ####### %0 #######
@ -519,9 +520,11 @@ RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
echo Setting desktop COLOUR ... echo Setting desktop COLOUR ...
%TOOLS%\setbgcol %bgcol_R% %bgcol_G% %bgcol_B% %TOOLS%\setbgcol %bgcol_R% %bgcol_G% %bgcol_B%
echo Starting the Desktopinfo tool ... if %start_desktopinfo% == 1 (
taskkill /F /IM DesktopInfo64.exe 2>nul echo Starting the Desktopinfo tool ...
start /B "" %TOOLS%\desktopinfo\DesktopInfo64.exe /ini=%TOOLS%\desktopinfo\desktopinfo.ini taskkill /F /IM DesktopInfo64.exe 2>nul
start /B "" %TOOLS%\desktopinfo\DesktopInfo64.exe /ini=%TOOLS%\desktopinfo\desktopinfo.ini
)
goto :eof goto :eof
:RESTART_EXPLORER :RESTART_EXPLORER