Author Topic: Cleanout Folders before Login  (Read 1040 times)

Styx

  • Guest
Cleanout Folders before Login
« 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 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.

Styx

  • Guest
Cleanout Folders before Login
« Reply #1 on: December 24, 2002, 01:41:26 AM »
I\'ve found how to do it...

As described Here 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