Deleting XP Multiple Users Temp Internet Files


Recommended Posts

Hi,

When I go onsite to a clients systems and have to run a vrius checker or scan on their system, it takes ages due to the crap in temporary internet files and temp files.

If the system has one user then it's not so much of a problem as I can quickly delete the temporary internet files and temp files.

The problem I encounter is when there are multiple users on the the system. It takes too long to log in as each user as do the deletion.

Is there an easier way? Maybe a little freeware app that can do the job? OR even a simple batch file to delete all the temp files in one go regardless of how many users?

Hope I've explained myself correctly :) and hope someone can come up with a good idea :)

Many thanks

I know I can log in as Administrator and set "Folder Options" to "Show hidden files and folders", then delete the contents of "Temporary Internet Files" and "Temp" under the "Local Settings" folder for each user.

But that is long and tedious. I'm hopinh a simple batch file or standalone exe app could do it. I don't want to have to install an app on the users pc to do the task.

I know the following batch file will delete the contents of "Temporary Internet Files" for the currently logged on user...

RD "%Systemdrive%\documents and settings\%USERNAME%\local settings\Temporary Internet Files\" /S /Q
MD "%Systemdrive%\documents and settings\%USERNAME%\local settings\Temporary Internet Files"

Is there something all those lines that would do it for all user account rather than just the currently logged on user?

I hope I'm explaining myself properly :)

Many thanks

Ok, here's what I've got so far...

REM Written by Sony Nair (UniqueTouch)
REM (http://www.uniquetouch.co.uk)
REM v1.0 02/02/2004
cls
@echo off
title Temp Files Remover for Windows XP
echo.
echo This will delete the follwing files for the currently logged in user on WinXP...
echo.
echo - Windows Prefetch Folder Content
echo - Windows Temp Files
echo - Temp Files Content
echo - Temporary Internet Files Content
echo.
echo Press any key to continue or close this window to exit.
Pause > nul
echo.
echo Emptying Windows Prefetch folder...
del "%Systemdrive%\windows\prefetch\*.*" /q
echo Done.
echo.
echo Removing Windows Temp Files...
rd "%systemdrive%\windows\Temp" /s /q
md "%systemdrive%\windows\Temp"
echo Done.
echo.
echo Removing Temp Files...
rd "%Systemdrive%%homepath%\local settings\Temp\" /s /q
md "%Systemdrive%%homepath%\local settings\Temp"
echo Done.
echo.
echo Removing Temporary Internet Files...
rd "%Systemdrive%%homepath%\local settings\Temporary Internet Files\" /s /q
md "%Systemdrive%%homepath%\local settings\Temporary Internet Files"
echo Done.
echo.
echo.
echo Deletion finished...
echo.
echo Press any key or close this window to exit.
Pause > nul

But the deletion of the "Temp" files and "Temporary Internet Files" is only for the currently logged on user.

Anyone got any ideas of how I can do it for other accounts without hardcosing the account names in?

P.s. I've attched the cmd file in case anyone wants to use what I have done so far.

DelTempFiles_WinXP.zipFetching info...

i want to know this too... :hmmm: it's quite annoying, for similar reasons.

i can think of a workaround:

in internet options, click the advanced tab. scroll to the bottom and check the box labeled "empty temporary internet files folder when browser is closed". whenever a user closes all IE windows (logoff) their cache will be emptied. but this isn't exactly what i'm looking for...

  gameguy said:
i want to know this too... :hmmm: it's quite annoying, for similar reasons.

i can think of a workaround:

in internet options, click the advanced tab. scroll to the bottom and check the box labeled "empty temporary internet files folder when browser is closed". whenever a user closes all IE windows (logoff) their cache will be emptied. but this isn't exactly what i'm looking for...

Thats a good idea gameguy, thanks.

Obviously thats only an otion I can use once I've visited the users machine which will save me the hassle of deleting temp inet files next time round.

I'm sure using CMD Scripting there is a way to figure out to call the user account names and then insert them using variables into a script similar to above.

Anybody able to shed some light on CMD Scripting?

Many thanks

Hi hurtng1,

Thanks for the code...

I understand what you say about how to use the "%%8".

But I would like to understand the code better if I can.

Can you explain the code or if possible point me to a site that has a tutorial?

Many thanks

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Now I may not quite understand this, so someone tell me if I'm off the mark here, but does this mean they'll be potentially removing drivers for now unsupported systems, such as old processors and chipsets? In the past 15 years, Windows has been amazing at just installing on any device, and often having zero, or just a few unessential drivers missing on first install. It would be a shame for that experience to go, though I understand the reasoning, or at least their financial reasoning for it!
    • Microsoft is removing legacy drivers from Windows Update by Usama Jawad Last month, we learned that Microsoft is making major changes to the development of hardware drivers in Windows. This included the retirement of Windows Metadata and Internet Services (WMIS), along with the process for pre-production driver signing. Now, the Redmond tech firm has informed partners that it will be getting rid of old drivers in Windows Update. In what is being described as a "strategic" move to improve the security posture and compatibility of Windows, Microsoft has announced that it will be performing a cleanup of legacy drivers that are still being delivered through Windows Update. Right now, the first phase only targets drivers that already have modern replacements present in Windows Update. As a part of its cleanup process, Microsoft will expire legacy drivers so that it is not offered to any system. This expiration involves removing audience segments in the Hardware Development Center. Partners can still republish a driver that was deemed as legacy by Microsoft, but the firm may require a justification. Once the Redmond tech giant completes its first phase of this cleanup, it will give partners a six-month grace period to share any concerns. However, if no concerns are brought forward, the drivers will be permanently eradicated from Windows Update. Microsoft has emphasized that this will be a regular activity moving forward and while the current phase only targets legacy drivers with newer replacements, the next phases may expand the scope of this cleanup and remove other drivers too. That said, each time the company takes a step in this direction, it will inform partners so that there is transparency between both parties. Microsoft believes that this move will help improve the security posture of Windows and ensure that an optimized set of drivers is offered to end-users. The firm has asked partners to review their drivers in Hardware Program so that there are no unexpected surprises during this cleanup process.
    • No idea, but I had a client the other week that lost the entire drive to it. I suggested relying on the Samsung T7's instead. The Sandisk Extreme's had reliability issues too.
    • I use it every day so personally yes I need it, or rather I want it. I use OpenShell though, not the garbage modern Start Menu. I just counted and at the moment I have a total of 92 program shortcuts organized into six folders almost exactly the way I did back in Windows 95. I can get to any program I want to run very quickly. I never use Search to find or run programs.
    • I do miss the Apps view from Windows 8.1 Update.
  • Recent Achievements

    • One Month Later
      KynanSEIT earned a badge
      One Month Later
    • One Month Later
      gowtham07 earned a badge
      One Month Later
    • Collaborator
      lethalman went up a rank
      Collaborator
    • Week One Done
      Wayne Robinson earned a badge
      Week One Done
    • One Month Later
      Karan Khanna earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      682
    2. 2
      ATLien_0
      274
    3. 3
      Michael Scrip
      220
    4. 4
      +FloatingFatMan
      171
    5. 5
      Steven P.
      160
  • Tell a friend

    Love Neowin? Tell a friend!