Need a script that will delete a users Internet temp folder on Windows 2000 and XP

I have been noticing more often that viruses are being found in the Internet temp folder located at c:\documents and settings\%username%\local settings\temporay internet files.  I would like to have a script that can be executed either by scheduled events or by logon/logoff that deletes all of the files located in that folder.  Can someone give me a complete script solution to do this?  
murrycAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dev8Commented:
Hello,

Have you tried Disk Cleanup?  You can add that as a scheduled task to run every day if you need it that way.  It would be more easier than having to write a script of some sort.

Hope that helps!

//j
0
murrycAuthor Commented:
dev8..can you run that task with switches so that it does not prompt the user for anything?  I am looking for a fast, simple, transparent solution that the user does not even know is working in the background.
0
nihlcatCommented:
Microsoft has DelProf.exe.  It Is WAY cool, and you can run it remotely:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=901A9B95-6063-4462-8150-360394E98E1E
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

dev8Commented:
0
dev8Commented:
Me again,

To setup up:

go to run,

type in cmd

then type cleanupmgr.exe \sageset:1

From here you will select what you want to cleanup.

Then add a scheduled task

add disk cleanup as a scheduled task and add it to run whenever you want

Before it finishes, click the option to select advanced settings

You should see a "run" line like so:

C:\WINDOWS\system32\cleanmgr.exe

simply add /sagerun:1 at the end:

C:\WINDOWS\system32\cleanmgr.exe /sagerun:1

This will automatically run diskcleanup for you in the background without user interaction!

Just refer to the article i provided earlier!

//j



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Debsyl99Commented:
Hi
PAQ on the subject here - worth a look courtesy of Pete Long et al,

Solution Title: Batch file to delete temporary internet files and others
http:Q_20794666.html

Deb :))
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Why not just configure outlook to Empty Temporary Internet Files when browser is closed? - Internet Control panel, near the end of the options listed under "Advanced" tab  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.