From 57cb44c97c86e57e2dbc31bcadd7125671178e91 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 10 Oct 2021 16:58:56 +0200 Subject: [PATCH] deleting more dirs in USERPROFILE --- tools/logon.cmd | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tools/logon.cmd b/tools/logon.cmd index c6393e9..1eeda43 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -243,20 +243,32 @@ echo. echo 3D Objects ... rd /S /Q %USERPROFILE%\"3D Objects" 2>nul -echo Contacts ... -rd /S /Q %USERPROFILE%\Contacts 2>nul - -echo Favorites ... -rd /S /Q %USERPROFILE%\Favorites 2>nul - echo Saved Games (folder used by Microsoft only) ... rd /S /Q %USERPROFILE%\"Saved Games" 2>nul -echo Links ... -rd /S /Q %USERPROFILE%\Links 2>nul - echo Searches ... -rd /S /Q %USERPROFILE%\Searches 2>nul +rd /S /Q %USERPROFILE%\"Searches" 2>nul + +for %%D in ( + + Contacts + Documents + Favorites + Links + Music + Pictures + Searches + Videos + +) do ( + + echo %%D ... + attrib -R -S -H %USERPROFILE%\%%D 1>nul 2>nul + attrib -R -S -H %USERPROFILE%\%%D\desktop.ini 1>nul 2>nul + del /F /Q %USERPROFILE%\%%D\desktop.ini 2>nul + rmdir /Q %USERPROFILE%\%%D 2>nul + +) echo. echo Starting workstation service ...