From 7ad944094489a616608985c9c6c19cc33e55cfe0 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 15 Jan 2023 18:22:39 +0100 Subject: [PATCH] Saved Games folder. --- scripts/settings.cmd | 1 + tools/logon.cmd | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/scripts/settings.cmd b/scripts/settings.cmd index 7c37fd2..cf955c7 100644 --- a/scripts/settings.cmd +++ b/scripts/settings.cmd @@ -8,6 +8,7 @@ set bgcol_R=3 set bgcol_G=131 set bgcol_B=135 set explorer_quick_access=1 +set preserve_savedgames_folder=1 set gitserver=gitea.exabyte.systems set gitrepo=personal set searchdomains=exabyte.systems,exabyte-systems.com diff --git a/tools/logon.cmd b/tools/logon.cmd index 912b2a2..9fcc857 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -26,6 +26,7 @@ set support_password= set emclient_license=0 set seafile_domain=0 set install_aerolite=0 +set preserve_savedgames_folder=0 echo ####### %0 ####### @@ -91,7 +92,7 @@ if EXIST "%ProgramFiles%\Seafile\bin\seafile-applet.exe" ( rem fix for broken SEAFILE folder access rights ... if EXIST %USERPROFILE%\Seafile ( echo Removing "system" attribute on SEAFILE storage folder ... - attrib -S %USERPROFILE%\Seafile /S /D + attrib -S %USERPROFILE%\Seafile /S /D 1>nul 2>nul ) @@ -352,7 +353,7 @@ if %ERRORLEVEL% == 0 ( rd /S /Q %STARTMENU_PUBLIC%\Accessibility 2>nul echo Moving "settings" link to system tools folder ... - attrib -S %STARTMENU_PUBLIC%\"Immersive Control Panel.lnk" + attrib -S %STARTMENU_PUBLIC%\"Immersive Control Panel.lnk" 1>nul 2>nul move /Y %STARTMENU_PUBLIC%\"Immersive Control Panel.lnk" ^ %STARTMENU_PUBLIC%\"System Tools" 2>nul @@ -378,16 +379,18 @@ rem WARNING! rem DO NOT remove the "PICTURES" folder! rem this is used and needed by the snipping tool! -echo folder "3D Objects" ... +echo removing folder "3D Objects" ... rd /S /Q %USERPROFILE%\"3D Objects" 2>nul -echo folder Links ... +echo removing folder "Links" ... rd /S /Q %USERPROFILE%\"Links" 2>nul -echo folder "Saved Games" (this is used by Microsoft only) ... -rd /S /Q %USERPROFILE%\"Saved Games" 2>nul +if %preserve_savedgames_folder% == 0 ( + echo removing folder "Saved Games" ... + rd /S /Q %USERPROFILE%\"Saved Games" 2>nul +) -echo folder "Searches" ... +echo removing folder "Searches" ... rd /S /Q %USERPROFILE%\"Searches" 2>nul for %%D in ( @@ -409,7 +412,12 @@ for %%D in ( ) -echo Removing more startmenu crap ... +echo. +echo Other tasks and fixes for the user +echo ######################################## +echo. + +echo Removing even more startmenu crap ... rd /S /Q %STARTMENU%\"Accessories" 2>nul rd /S /Q %STARTMENU%\"Accessibility" 2>nul rd /S /Q %STARTMENU%\"Administrative Tools" 2>nul @@ -417,11 +425,6 @@ rd /S /Q %STARTMENU%\"Maintenance" 2>nul rd /S /Q %STARTMENU%\"System Tools" 2>nul rd /S /Q %STARTMENU%\"Windows Powershell" 2>nul -echo. -echo Other tasks and fixes for the user -echo ######################################## -echo. - rem ... stupid OS! rem IE is such a zombie. I's coming back all the time ... echo Removing IE link in users start menu ... @@ -438,6 +441,7 @@ echo Creating "Pictures" folder for snipping tool ... mkdir %USERPROFILE%\Pictures 2>nul rem workstation service should run always ... +echo. echo Starting the workstation service ... net start workstation 1>nul 2>nul net config workstation