From c9b28639a93f549d1cea80587c57abe2a0d85dce Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 22 Jan 2023 12:56:24 +0100 Subject: [PATCH] bugfixing --- 06_Copy2Stick.cmd | 6 ++--- scripts/disable-accountpicture.cmd | 28 +++++++++++++++++------- scripts/modify-explorer.cmd | 35 +++++++++++++++++++++--------- scripts/modify-windowsupdate.cmd | 33 +++++++++++++++++++++------- scripts/settings.cmd | 9 ++++---- tools/logon.cmd | 4 +++- tools/personalfiles.cmd | 24 +++++++++++++++----- 7 files changed, 98 insertions(+), 41 deletions(-) diff --git a/06_Copy2Stick.cmd b/06_Copy2Stick.cmd index 382ca7c..61da6dc 100644 --- a/06_Copy2Stick.cmd +++ b/06_Copy2Stick.cmd @@ -5,6 +5,9 @@ set BOOT=boot.wim set IMAGE=install.wim set SCRIPT_SETTINGS=scripts\settings.cmd set COMPANY_SETTINGS=company\settings.cmd +set LANG=en-US +set support_user= +set support_password= IF %1.==. GOTO USAGE @@ -15,14 +18,11 @@ rem =================== echo searching for SCRIPT settings ... if NOT EXIST %SCRIPT_SETTINGS% ( echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND - set LANG=en-US ) else ( echo OK. Loading SCRIPT settings ... call %SCRIPT_SETTINGS% ) -set support_user= -set support_password= echo searching for COMPANY settings ... if NOT EXIST %COMPANY_SETTINGS% ( echo INFO: config file %COMPANY_SETTINGS% NOT FOUND diff --git a/scripts/disable-accountpicture.cmd b/scripts/disable-accountpicture.cmd index 8598163..77f07fe 100644 --- a/scripts/disable-accountpicture.cmd +++ b/scripts/disable-accountpicture.cmd @@ -1,19 +1,31 @@ @echo off -set TARGET="%ALLUSERSPROFILE%\Microsoft\User Account Pictures" +set SCRIPT_SETTINGS=settings.cmd +set COMPANY_SETTINGS=..\company\settings.cmd rem default: empty logo (disables all logos on logon screen) +set TARGET="%ALLUSERSPROFILE%\Microsoft\User Account Pictures" set LOGO=config\user-empty.png +set logon_logo=0 echo ####### %0 ####### -if EXIST settings.cmd ( - echo loading settings ... - call settings.cmd +echo. +echo searching for SCRIPT settings ... +if NOT EXIST %SCRIPT_SETTINGS% ( + echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND ) else ( - echo WARNING: settings.cmd not found! - echo setting defaults ... - set logon_logo=1 + 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% ) echo ++++++++++++++++++ @@ -41,7 +53,7 @@ for %%F in ( ) reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^ - /v UseDefaultTile /t REG_DWORD /d 1 /f + /v UseDefaultTile /t REG_DWORD /d 1 /f 2>nul echo ####### %0 ####### diff --git a/scripts/modify-explorer.cmd b/scripts/modify-explorer.cmd index 7a8e4af..a52563f 100644 --- a/scripts/modify-explorer.cmd +++ b/scripts/modify-explorer.cmd @@ -1,14 +1,29 @@ @echo off +set SCRIPT_SETTINGS=settings.cmd +set COMPANY_SETTINGS=..\company\settings.cmd + +rem default: disabled +set explorer_quick_access=0 + echo ####### %0 ####### -if EXIST settings.cmd ( - echo loading settings ... - call settings.cmd +echo. +echo searching for SCRIPT settings ... +if NOT EXIST %SCRIPT_SETTINGS% ( + echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND ) else ( - echo WARNING: settings.cmd not found! - echo setting defaults ... - set explorer_quick_access=1 + 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% ) echo ++++++++++++++++++++++++++++++++++ @@ -19,11 +34,11 @@ echo. if %explorer_quick_access% == 0 ( echo disabling explorer quick access ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^ - /v "HubMode" /t REG_DWORD /d 1 /f 1>nul + /v "HubMode" /t REG_DWORD /d 1 /f 2>nul ) else ( echo enabling explorer quick access ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^ - /v "HubMode" /t REG_DWORD /d 0 /f 1>nul + /v "HubMode" /t REG_DWORD /d 0 /f 2>nul ) echo disabling network icon ... @@ -31,8 +46,8 @@ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\N /v "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /t REG_DWORD /d 1 /f 1>nul echo removing 3d Objects ... -reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 1>nul -reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 1>nul +reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 2>nul +reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 2>nul echo restarting explorer ... taskkill /f /im explorer.exe 1>nul 2>nul diff --git a/scripts/modify-windowsupdate.cmd b/scripts/modify-windowsupdate.cmd index fd267cc..0e69cbe 100644 --- a/scripts/modify-windowsupdate.cmd +++ b/scripts/modify-windowsupdate.cmd @@ -1,14 +1,29 @@ @echo off +set SCRIPT_SETTINGS=settings.cmd +set COMPANY_SETTINGS=..\company\settings.cmd + +rem default: disabled +set windows_targetrelease=0 + echo ####### %0 ####### -if EXIST settings.cmd ( - echo loading settings ... - call settings.cmd +echo. +echo searching for SCRIPT settings ... +if NOT EXIST %SCRIPT_SETTINGS% ( + echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND ) else ( - echo WARNING: settings.cmd not found! - echo setting defaults ... - set windows_targetrelease=0 + 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% ) echo ++++++++++++++++++++++++++++++++++ @@ -19,11 +34,13 @@ echo. if %windows_targetrelease% == 0 ( echo WARNING: windows target release NOT set! ) else ( + echo setting windows update target release ... reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^ - /v TargetReleaseVersion /t REG_DWORD /d 1 /f 1>nul + /v TargetReleaseVersion /t REG_DWORD /d 1 /f 2>nul reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^ - /v TargetReleaseVersionInfo /t REG_SZ /d %windows_targetrelease% /f 1>nul + /v TargetReleaseVersionInfo /t REG_SZ /d %windows_targetrelease% /f 2>nul + ) echo ####### %0 ####### diff --git a/scripts/settings.cmd b/scripts/settings.cmd index f2ca6f3..03c9db1 100644 --- a/scripts/settings.cmd +++ b/scripts/settings.cmd @@ -8,8 +8,7 @@ set bgcol_R=3 set bgcol_G=131 set bgcol_B=135 set explorer_quick_access=1 -set preserve_savedgames_folder=0 -set gitserver=gitea.exabyte.systems -set gitrepo=personal -set searchdomains=exabyte.systems,exabyte-systems.com - +set preserve_savedgames_folder=1 +set searchdomains=localdomain,fritz.box +set gitserver=github.com +set gitrepo= diff --git a/tools/logon.cmd b/tools/logon.cmd index 7189243..1a6c19e 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -40,7 +40,6 @@ if NOT EXIST %SCRIPT_SETTINGS% ( ) else ( echo OK. Loading SCRIPT settings ... call %SCRIPT_SETTINGS% - echo LANG=%LANG% ) echo. @@ -62,6 +61,9 @@ echo ##### GENERIC tasks and settings echo ##### echo. +rem show language settings ... +echo INFO: language is set to [ %LANG% ] + rem remove desktop wallpaper, set desktop colour and start bginfo call :BGINFO echo. diff --git a/tools/personalfiles.cmd b/tools/personalfiles.cmd index 01bc481..ac725ef 100644 --- a/tools/personalfiles.cmd +++ b/tools/personalfiles.cmd @@ -3,9 +3,11 @@ rem =================== rem GLOBAL VARS rem =================== + set TOOLS=c:\tools +set SCRIPT_SETTINGS=%TOOLS%\scripts\settings.cmd +set COMPANY_SETTINGS=%TOOLS%\company\settings.cmd set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done -set SETTINGS=%TOOLS%\scripts\settings.cmd set GITWORKDIR=%USERPROFILE%\workspace\git rem already done ? @@ -22,12 +24,22 @@ rem =================== rem CONFIGFILE CHECK rem =================== -if NOT EXIST %SETTINGS% ( - echo. - echo WARNING: %SETTINGS% NOT FOUND - echo. +echo. +echo searching for SCRIPT settings ... +if NOT EXIST %SCRIPT_SETTINGS% ( + echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND ) else ( - call %SETTINGS% + 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% ) echo ++++++++++++++++++