TheTechGuide Forum
General Category => Tech Clinic => Topic started by: Styx on December 13, 2002, 11:07:57 AM
-
Heya,
I\'m trying to get WinXP Pro to remove and then recreate some folders everytime it\'s booted Before Login.
The Folders (and subfolders) I want to remove are:
%username%Cookies;
%username%Temp;
%username%Local SettingsTemp
As you probably know some of these Folders contain \'index.dat\' files which are locked once login occurs.
Harware Hell (http://\"http://hardwarehell.com/xp_clean.shtml#xp\") has some information on this but the removal of the \'index.dat\' files fail because users are required to Login inorder for the \'cleanxp.cmd\' to run. 
I used to be able to do this cleanup on Win95/98 PC\'s by adding \'Deltree /Y\' commands to the Autoexec.bat but XP doesn\'t seem to read the Autoexec with RD /S/Q commands.
Advice and/or Information would be helpful.
-
I\'ve found how to do it...
As described Here (http://\"http://hardwarehell.com/articles/addendum.shtml\") Then scroll down to Win2K Pro section.
@ 3) run \'gpedit.msc\' instead of \'gpedit.exe\'
Add desired .cmd script to UserConfiguration/WindowSettings/Scripts (Logon/LogOff) and double click LogOff .
A popup window appears where you add your script.
User Folders are Cleaned Out as Users LogOff Not @ LogOn