First you need to create the script that would tell Windows which folder to delete. Then you would go to Group Policy and tell Windows to run this script at shutdown as what will be shown here.
Here is the script written as a batch file.
c:
cd cd c:\windows\prefetch
del *.* /q
cd C:\"Documents and Settings"\user\Desktop\temp
del *.* /q/f/s
cd rd C:\"Documents and Settings"\user\Desktop\temp /q/f/
Save this file as a plain .txt file. As you can see, this script will delete the contents inside the prefetch folder and a folder on the desktop called temp.
Now go to GP and tell it to run this script at shutdown. Type gpedit.msc in the Run command. Navigate to the appropriate location as seen in the picture.

2 comments:
Cleaning your prefetch folder at shutdown will cripple Windows Boot Times and Application load times:
http://mywebpages.comcast.net/SupportCD/XPMyths.html
True, but if you want security, it's the way to go
Post a Comment