From f1eff09cdc1965e7f534ddf77a8b49413fe1b568 Mon Sep 17 00:00:00 2001
From: "Michael H.G. Schmidt" <michael@schmidt2.de>
Date: Wed, 28 Dec 2022 16:42:58 +0100
Subject: [PATCH] testing

---
 scripts/autoconfig-all-ORIG.cmd | 250 ++++++++++++++++++++++++++++++++
 scripts/autoconfig-all.cmd      | 112 --------------
 2 files changed, 250 insertions(+), 112 deletions(-)
 create mode 100644 scripts/autoconfig-all-ORIG.cmd

diff --git a/scripts/autoconfig-all-ORIG.cmd b/scripts/autoconfig-all-ORIG.cmd
new file mode 100644
index 0000000..56a38a0
--- /dev/null
+++ b/scripts/autoconfig-all-ORIG.cmd
@@ -0,0 +1,250 @@
+@echo off
+rem this script is doing most of the work ...
+
+set T=c:\TEMP
+set TOOLS=c:\tools
+set SCRIPTS=%TOOLS%\scripts
+set LOG=%SCRIPTS%\autoconfig-all.txt
+set COMPANY_SETTINGS=..\company\settings.cmd
+
+del /F %LOG% 1>nul 2>nul
+if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
+shift /1
+
+rem show window with logfile while running scripts ...
+start %TOOLS%\logmonitor.exe %LOG%
+
+echo ####### %0 #######
+date /t
+time /t
+echo.
+
+echo creating %T% ...
+mkdir %T% 1>nul 2>nul
+
+echo cd to %SCRIPTS% ...
+cd /D %SCRIPTS%
+
+
+rem SCRIPT settings ...
+if EXIST settings.cmd (
+  echo loading settings ...
+  call settings.cmd
+) else (
+  echo WARNING: settings.cmd not found!
+  echo setting defaults ...
+  set windows_updates=1
+)
+
+echo ++++++++++++++++++
+echo windows_updates=%windows_updates%
+echo install_firefox=%install_firefox%
+echo install_aerolite=%install_aerolite%
+echo ++++++++++++++++++
+echo.
+
+
+rem COMPANY settings ...
+set mydomain=
+if NOT EXIST %COMPANY_SETTINGS% (
+  echo INFO: COMPANY %COMPANY_SETTINGS% NOT FOUND
+) else (
+  echo OK. Loading COMPANY settings ...
+  call %COMPANY_SETTINGS%
+)
+
+echo ++++++++++++++++++
+echo mydomain=%mydomain%
+echo ++++++++++++++++++
+echo.
+
+
+echo #######################
+echo ### UNPACK and COPY ###
+echo #######################
+echo.
+
+rem 7-zip is essential for other scripts ...
+call unpack-7zip.cmd
+echo.
+
+rem windows update blocker is in the zipfiles ...
+call unpack-zipfiles.cmd
+echo.
+
+rem put vnc in place ...
+call unpack-vnc.cmd
+echo.
+
+rem copy some other stuff ...
+call copy-executables.cmd
+echo.
+
+
+echo #######################
+echo ### MODIFICATIONS   ###
+echo #######################
+echo.
+
+rem this must be done EARLY!
+if %windows_updates% == 0 (
+  call disable-updates.cmd 
+  echo.
+)
+
+echo allow execution of any powershell scripts ...
+powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine"
+powershell -Command ^
+"$T=Get-ExecutionPolicy ; if ($T -eq 'Bypass') { ^
+  write-host 'POWERSHELL: Execution Policy was set to BYPASS' ^
+} ^
+  else { ^
+  write-host 'ERROR: CANNOT SET Execution Policy to BYPASS !' ^
+}"
+echo.
+
+echo enabling OS feature "NetFx3" ...
+dism /online /enable-feature /featurename:NetFx3 /All /Source:c:\sources\sxs /LimitAccess
+echo .
+
+call modify-path.cmd 
+echo.
+
+call modify-explorer.cmd 
+echo.
+
+call modify-powersettings.cmd
+echo.
+
+if %install_aerolite% == 1 (
+  call modify-desktoptheme.cmd
+  echo.
+)
+
+call modify-taskbar.cmd
+echo.
+
+call modify-timeservers.cmd
+echo.
+
+call modify-searchdomains.cmd
+echo.
+
+echo #######################
+echo ### UNINSTALL tasks ###
+echo #######################
+echo.
+
+powershell -command .\uninstall-apps.ps1
+echo.
+
+echo #####################
+echo ### INSTALL tasks ###
+echo #####################
+echo.
+
+call install-tweaks.cmd
+echo.
+
+call install-adk.cmd
+echo.
+
+call install-git.cmd
+echo.
+
+powershell -command .\install-windowsterminal.ps1
+echo.
+
+rem fuck you microsoft ...
+call install-openshell.cmd
+echo.
+
+rem fuck you google ...
+if %install_firefox% == 1 (
+  call install-firefox.cmd
+  echo.
+)
+
+call install-win32diskimager.cmd
+echo.
+
+call install-shortcuts.cmd
+echo.
+
+rem should be done as late as possible ...
+call install-logonscript.cmd
+echo.
+
+echo add full access rights to all users on public icons ...
+icacls %PUBLIC%\Desktop\*.lnk /grant Users:F
+echo.
+
+echo removing read-only flag on tools folder ...
+attrib /S /D -R %TOOLS%\*
+echo.
+
+
+echo #####################
+echo ### DISABLE tasks ###
+echo #####################
+echo.
+
+call disable-accountpicture.cmd 
+echo.
+
+call disable-logonbackground.cmd 
+echo.
+
+call disable-meetnow.cmd
+echo.
+
+call disable-settingsheader.cmd
+echo.
+
+call disable-autologon.cmd
+echo.
+
+call disable-systemproxy.cmd
+echo.
+
+call disable-ipv6.cmd
+echo.
+
+powershell -command .\disable-soundscheme.ps1
+echo.
+
+
+echo #####################
+echo ### CLEANUP tasks ###
+echo #####################
+echo.
+
+rem this must be done as late as possible ... stupid os problem #1
+powershell -Command .\cleanup-tiles.ps1
+echo.
+
+rem ... stupid os problem #2
+call cleanup-startmenu.cmd
+echo.
+
+rem ... stupid os problem #3
+call cleanup-programlist.cmd
+echo.
+
+rem ... stupid os problem #4
+call unpin-taskbar-icons.cmd
+echo.
+
+rem ... remove stupid public folders
+call cleanup-publicdir.cmd
+echo.
+
+date /t
+time /t
+echo ####### %0 #######
+echo READY.
+echo.
+
+echo rebooting ...
+shutdown -g -t 0
+
diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd
index 56a38a0..faf1c09 100644
--- a/scripts/autoconfig-all.cmd
+++ b/scripts/autoconfig-all.cmd
@@ -81,63 +81,6 @@ call copy-executables.cmd
 echo.
 
 
-echo #######################
-echo ### MODIFICATIONS   ###
-echo #######################
-echo.
-
-rem this must be done EARLY!
-if %windows_updates% == 0 (
-  call disable-updates.cmd 
-  echo.
-)
-
-echo allow execution of any powershell scripts ...
-powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine"
-powershell -Command ^
-"$T=Get-ExecutionPolicy ; if ($T -eq 'Bypass') { ^
-  write-host 'POWERSHELL: Execution Policy was set to BYPASS' ^
-} ^
-  else { ^
-  write-host 'ERROR: CANNOT SET Execution Policy to BYPASS !' ^
-}"
-echo.
-
-echo enabling OS feature "NetFx3" ...
-dism /online /enable-feature /featurename:NetFx3 /All /Source:c:\sources\sxs /LimitAccess
-echo .
-
-call modify-path.cmd 
-echo.
-
-call modify-explorer.cmd 
-echo.
-
-call modify-powersettings.cmd
-echo.
-
-if %install_aerolite% == 1 (
-  call modify-desktoptheme.cmd
-  echo.
-)
-
-call modify-taskbar.cmd
-echo.
-
-call modify-timeservers.cmd
-echo.
-
-call modify-searchdomains.cmd
-echo.
-
-echo #######################
-echo ### UNINSTALL tasks ###
-echo #######################
-echo.
-
-powershell -command .\uninstall-apps.ps1
-echo.
-
 echo #####################
 echo ### INSTALL tasks ###
 echo #####################
@@ -184,61 +127,6 @@ attrib /S /D -R %TOOLS%\*
 echo.
 
 
-echo #####################
-echo ### DISABLE tasks ###
-echo #####################
-echo.
-
-call disable-accountpicture.cmd 
-echo.
-
-call disable-logonbackground.cmd 
-echo.
-
-call disable-meetnow.cmd
-echo.
-
-call disable-settingsheader.cmd
-echo.
-
-call disable-autologon.cmd
-echo.
-
-call disable-systemproxy.cmd
-echo.
-
-call disable-ipv6.cmd
-echo.
-
-powershell -command .\disable-soundscheme.ps1
-echo.
-
-
-echo #####################
-echo ### CLEANUP tasks ###
-echo #####################
-echo.
-
-rem this must be done as late as possible ... stupid os problem #1
-powershell -Command .\cleanup-tiles.ps1
-echo.
-
-rem ... stupid os problem #2
-call cleanup-startmenu.cmd
-echo.
-
-rem ... stupid os problem #3
-call cleanup-programlist.cmd
-echo.
-
-rem ... stupid os problem #4
-call unpin-taskbar-icons.cmd
-echo.
-
-rem ... remove stupid public folders
-call cleanup-publicdir.cmd
-echo.
-
 date /t
 time /t
 echo ####### %0 #######