I'm trying to find a way to automatically clean/delete the temporary files from C:\Documents and Settings\user\Local Settings\Temp\ at shutdown/boot on my Windows XP Pro x64 SP2 machine.
The main reason for this is to clean Local Settings/Temp to remove old junk automatically. (I had thought I had this covered through FireFox settings, but I was only clearing temporary internet files). Currently, there's around 3GB of temporary files and I'd like to prevent this build up without having to remember to do anything on my part.
I have already looked at using Disk Cleaner (explained in this question), but it doesn't seem to touch that directory.
I'm aware of programs such as CCleaner, but would ideally like to use a solution that doesn't require additional software (so, I expect, something using a scheduled bat/cmd script would be what I'm looking for)
One of the potential issues, I believe, is that there may be legitimate files in the Temp folder that may be needed on the next boot (for software installations or updates, for example) and the perfect solution would be able to distinguish those and leave them until they weren't needed (Note: I realise this perfect solution may not be reasonably possible).
So, what are my options for automatically deleting the temp files from C:\Documents and Settings\user\Local Settings\Temp?
EDIT: Clarification: I've already set up Disk Cleaner on a shutdown script, but when cleaning temporary files, Disk Cleaner doesn't clean this particular directory, and so I'm looking for alternative options (see this question for a little more detail)