When you ask Windows to empty the temp files in "disk cleanup" it never seems to listen. This is because it is limited to deleting only those files that are more than a week old. This registry tweak will correct that and allow you to completely empty the file, or to set a more reasonable limit.
By altering the LastAccess value in the registry, you can configure the Disk Cleanup utility to delete all the files in the Temp folder regardless of the last accessed date. Here's how:
1. Launch the Registry Editor (Regedit.exe) from the run dialog in the start menu.
2. Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Explorer\VolumeCaches\Temporary Files
.
3. Locate and double-click the LastAccess value.
4. When you see the Edit DWORD Value dialog box, change the Value Data setting from 7 to 0, or the number of days that you want to retain temp files for, and click OK.
5. To complete the operation, close the Registry Editor and restart Windows XP.
Changing the value to 0 will force the Disk Cleanup utility to delete all the files in the Temp folder every time that you select the Temporary Files check box in disk clean up. This file can become quite large as more page cache is used by your browser every time you surf. The limit to this cache can be set within the browser (25 mgbt is normal), but this means that the files must be dealt with during a defrag, slowing it down considerably.