I just recently stumbled upon a nifty way to make my windows xp machine run a little bit faster. Check it out.
If you search your entire computer for temp files, you may be surprised to find hundreds of megabytes worth of data that has been sitting around since God knows when. Windows is supposed to automatically delete these, but sometimes it just doesn’t happen. Now… supposedly when you boot up your computer or internet explorer, Windows will scan through your temp files (looking for recently viewed web pages, etc). So if everything is cluttered up, things might run a little bit slow.
So the goal here is to delete all temp files before we shut down the system at the end of the day. This way, everything is fresh and clean, come next morning!
- Open up a copy of notepad and paste in the following chunk of text:
taskkill /F /FI "USERNAME ne SYSTEM" /FI "USERNAME ne LOCAL SERVICE" /FI "USERNAME ne NETWORK SERVICE" /FI "IMAGENAME ne explorer.exe" /FI "IMAGENAME ne cmd.exe" /FI "IMAGENAME ne taskkill.exe"
RD /S /q "%HOMEPATH%\Local Settings\History"
RD /S /q "%HOMEPATH%\Local Settings\Temp"
RD /S /q "C:\temp"
RD /S /q "C:\Windows\Temp"
SHUTDOWN -s -t 01
- Save the file off as "C:\shutdown.bat" (make sure you set the file type as "All Files", *not* "Text Documents")
- Browse to your C:\ drive using windows explorer and right-click on the shutdown.bat file. Select the "Create Shortcut" option in the context menu.
- Rename the shortcut file to "Clear Temp Files & Shut Down".
- Right-click on the shortcut and select "Properties" from the context menu.
- When the properties window pops up, make sure you are on the "Shortcut" tab and click on the "Change Icon" button. If it gives you some kind of error about the file not containing any icons, ignore it and just click OK.
- Where it says "Look for icons in this file:", make sure that it says, "%SystemRoot%\system32\SHELL32.dll".
- Select the red, square icon with the circle and a vertical line in the middle. This is the shutdown icon that you see when you click on your start button and select "Turn off your computer".
- Ok your way out of there back to your explorer window.
- Drag the shortcut to your desktop.
Now, whenever you want to shut down your computer, just double-click the icon on your desktop!
Windows will clear your temp files after killing all your programs (it can’t clear temp files if programs are currently using them), and then it will proceed to shut down.
IMPORTANT NOTE: If you are missing the taskkill.exe file, This guy provides a link to download it. Then just extract it to your C:\Windows\System32\ folder.