gents,

my customer noticed (using CCleaner) that there are a lot of temporary files to be cleaned.

I suggested that I take care of it centralized, maybe using a startup-GPO-script or using the windows scheduler.

1st question is: I thought windows is handling temp files itself and deletes it - obviously it doesn’t.

2nd question: could any problems occur if I clean %Temp%*.* and C.\Windows\Temp*.* ?

3 Spice ups

It should not cause a problem deleting files in that folder, but keep in mind they are also seeing the temp folder for the user profile. So your script will need to include the C:/Users/%username%/AppData/Local/Temp/ to get those files also.

Please take in mind I have not tried this before but it should be fine. I would definitely test before implementing.

4 Spice ups

I will not recommend running a script that cleans temp files on boot, this will increase the overall boot time.

Secondly I will advice to use Revo Uninstaller Free Edition to cleanup the garbage not only from Temp folder but from all other hidden folders created by many software. The Revo Cleanup tool is so far the best I have ever used.

1 Spice up

Add this to your log off script

cleanmgr /sagerun 1

it won’t slow your boot, but who cares about how long it takes to shutdown.

3 Spice ups

Some installers/uninstallers (known example is AVG’s own removal kits for their software) place themselves in temp and must perform a reboot and then relaunch after the reboot to finish their cleaning. This may be the issue with other software removal or installation that requires a reboot in the middle of the process, if every time on boot you’re clearing the Temp locations. Maybe clearing everything older then a week or a few days would be better, to limit risk in situations like that.

2 Spice ups

why not just use ccleaner and configure it to run on startup to clean out any files that you don’t want?

2 Spice ups

Agreed…

See screenshot below

ccleaner.jpg

1 Spice up

I agree, ccleaner is a great product, just let it run at start up.
One nice thing that ccleaner does is, it does not delete temp files less than 24 hours old, so if there was an installed set to finish after reboot or something like that, it will not delete it and cause you more headaches.

thanks for all the great info.