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 TOOLS=%SystemDrive%\tools
set SETTINGS=settings.cmd
set SCRIPTS=%TOOLS%\scripts
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
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 ...
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 #######
date /t
time /t
echo.
echo creating %T% ...
mkdir %T% 1>nul 2>nul
rem ===================
rem CONFIGFILE CHECKS
rem ===================
echo cd to %SCRIPTS% ...
cd /D %SCRIPTS%
rem SCRIPT settings ...
if EXIST %SETTINGS% (
echo loading settings ...
call %SETTINGS%
echo.
echo searching for SCRIPT settings ...
if NOT EXIST %SCRIPT_SETTINGS% (
echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND
) else (
echo WARNING: [ %SETTINGS% ] not found!
echo setting defaults ...
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 OK. Loading SCRIPT settings ...
call %SCRIPT_SETTINGS%
)
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 LANG=%LANG%
echo windows_updates=%windows_updates%
@ -65,9 +79,20 @@ echo preserve_savedgames_folder=%preserve_savedgames_folder%
echo searchdomains=%searchdomains%
echo gitserver=%gitserver%
echo gitrepo=%gitrepo%
echo start_desktopinfo=%start_desktopinfo%
echo ++++++++++++++++++
echo.
rem ======
rem MAIN
rem ======
echo creating %T% ...
mkdir %T% 1>nul 2>nul
echo cd to %SCRIPTS% ...
cd /D %SCRIPTS%
echo #######################
echo ### UNPACK and COPY ###
echo #######################

View File

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

View File

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