I suggest it may be better to do this with a global Shutdown script rather than at Startup. Also, you won't need to worry about TIF's if you open 'Internet Explorer', select 'Tools > Options' then, on the 'Advanced Tab', tick the checkbox labelled 'Empty Temporary Internet Files folder when browser is closed'.
I always re-direct TEMP and TMP files by changing the temporary environment variable (for both user- and system-created temporary files) to point to a folder I create called 'Temp in the root of C:.
To do this, select 'Start > Settings > Control Panel > System' then, on the 'Advanced' tab, click on the 'Environment Variables' button. In both upper and lower areas, change the location for TEMP and TMP files to point to 'C:\Temp'. Note that you have to amend the upper area for each profile on the PC as this is a 'per user' setting.
My Shutdown script looks something like this:
Code:
Const oSrc = "C:\Temp"
Dim FSO
Set FSO = WScript.CreateObject("Scripting.FileSystemObject")
'Delete the folder (forcibly, to handle read-only attributes) then re-create it
FSO.DeleteFolder oSrc,True
FSO.CreateFolder oSrc
Set FSO = Nothing
WScript.Quit()
To use it in XP Pro, copy/paste the code above into Notepad then save it as something like 'DeleteTemp' to 'C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\Shutdown'. (You can save it anywhere but this location just makes it easier for the Group Policy Editor to find.)
Click 'Start > Run' and enter 'gpedit.msc'. In the Group Policy Editor, expand 'Windows Settings' in the 'Computer Configuration' section then click on 'Scripts (Startup/Shutdown)' then, in the right-hand pane, click 'Shutdown'.
In the dialog that appears, click on the 'Add' button then 'Browse' to and select your shutdown script. Apply/OK your way back out of the Group Policy Editor and you're done.
Hope this helps...