Nasty code!

Soldato
Joined
6 May 2009
Posts
20,501
I added this to a logon script yesterday. Its supposed to delete all temp internet files within folders to remove stuff like outlook OLK temp files


if exist "C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*.*" (
cd "C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*"
del *.* /s /f /q
)

What it actually does is remove all files from temp internet files and users personal U:\ drives files. :eek: Not the folders, just the files. What part of the script specifies it should remove u:\ data??

Currently in the process of restoring a mass of personal data, luckily i caught it before around another 50 people logged in.

Just noticed in active directory under profile settings is the login script that had the code in. Underneath this is the home folder where it connects to U:\
How did the script tie the two together?
 
Last edited:
Thanks Nathan. With a simple C: above the code it works. If the C: is not in it removes everything from U: but not C:. With the C: in it removes from C: and not U

Your more simple line also works. Where is the group policy setting for purging temporary internet files? It mainly needs to clear the content.outlook folder

C:
if exist "C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*.*" (
cd "C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*"
del *.* /s /f /q
)
 
Back
Top Bottom