abhishekr2
(Abhishek1528)
1
Hi,
Is there any way to clean up the temp folders and temp internet folders, when ever a laptop or a Desktop is connected in a Network ?
Regards
Abhishek R
4 Spice ups
Do you mean from the laptop itself or desktop?
If so yes with a script set in your GPO in logon logoff, you will need to add an if statement to to the script to check last run like a date check.
As well there is an IE GPO that, depending on the version of OS and ADUC Server can do this as well with the IE Maintenance kit unless already installed.
abhishekr2
(Abhishek1528)
3
Hi,
Thanks for the reply, but i have tried this. In this Internet explorer GPO is working fine, but logoff script is creating headache. Its taking too much time for a system to log off which is causing irritation to user. I want solution like, whenever a user comes online (Laptop or Desktop is connected to LAN) it should detect and start the cleaning. If you can help in this, it would be a great help.
Regards
Abhishek
alex3031
(Alex3031)
4
Might be able to code something to detect the network status that run as a service or a hidden application and cleans it hen they connect to the network, but that might be beyond your capability. I know with Linux you can run scripts triggered by the interface coming up and going down. I don’t know if Windows does this, you might do a google search to see if you can.
texkonc
(Texkonc)
5
You can set a GPO to clear it when they close the browser.
Texkonc wrote:
You can set a GPO to clear it when they close the browser.
this would clear the temp internet files but not necessarily the temp location as well. as a logon script you can add a simple Dos style command to delete folder contents, rather than any clever disk cleanups if you specify the location and just blanket command delete anything inside it it should be a lot quicker, i prefer log on scripts than log off , users whinge more if it keeps them from going home on time than if it’s happening while they are “brewing up” in the morning
noitforyou
(NoITForYou)
7
Here are 3 files, .bat and .vbs, that I got from SW and somewhere else that I’ve used to clean computers. You can look in them and see one or two is for Temp folders only, the batch file will recurse all user folders and clean Temp and Temp IE folders as well. Nice thing is that they’re all pretty fast, especially if the temp folders aren’t too full.
But as far as when one should execute, or how you decide if it should - I think a logon script would be the way to go. And maybe just make it a standard, routine logon script for all computers, but that’s just my opinion.
DeleteTemp.zip (2.63 KB)
I know CCleaner can be run in the background from Task Scheduler. Possibly you could set this up to run based on one of those events from there?
I concure - it’s set up for me and completely painless.
+1 To CCleaner.
I have it set to run at logoff. Check out this how-to:
http://community.spiceworks.com/how_to/show/1576
I have tried a program called TempDelete which I run from the Startup folder. Seems to work well and clears the temp folders very well.
+1 to CC cleaner. Actually I use an older version of a program called Free Internet Eraser to do similar.
Russ Cantrell wrote:
I know CCleaner can be run in the background from Task Scheduler. Possibly you could set this up to run based on one of those events from there?
Often wondered about this myself but never thought to asked great advice…thanks.
abhishekr2
(Abhishek1528)
14
Hi All,
First of all, thanks to all for the amazing response. I have tried the CCleaner, but it needs user interaction to run the program… is there any way to run it silently in background ?
Thanks
Abhi
Hi Abhi,
The how-to I posted sets it up to run at logoff, silently with no interaction. If you want to run it as a script, then:
ccleaner.exe /auto will run it silently.
1 Spice up
abhishekr2
(Abhishek1528)
16
Hi,
Thanks, CCleaner is working fine for me. So is that possible to make CCleaner run once in a week using GPO.
Regards
Abhi.