Running CCleaner over a domain to clean profiles
#21 OFFLINE
Posted 17 April 2009 - 09:46 PM
#22 OFFLINE
Posted 04 June 2009 - 09:57 AM
This is then just a job that is run in Altiris regardless if users are logged in or out. I also have it deleting CCleaner off the machine after so I don't have to leave it there.
#include <File.au3>
#include <Array.au3>
Global $count
FileCopy('\\YOURSHARE\CCleaner\CCleaner.exe', @SystemDir & '\CCleaner.exe', 1)
FileCopy('\\YOURSHARE\CCleaner\portable.dat', @SystemDir & '\portable.dat', 1)
FileCopy('\\YOURSHARE\CCleaner\ccleaner.ini', @SystemDir & '\ccleaner.ini', 1)
;~ Check for docs and settings for profiles
$uList = _FileListToArray('C:\Documents and Settings')
If @error = 1 Then
Exit
EndIf
For $i = 1 To $uList[0]
If $uList[$i] = "All Users" Or $uList[$i] = "Default User" Or $uList[$i] = "LocalService" Or $uList[$i] = "NetworkService" Then
Else
_Count()
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temp\|*.*')
_Count()
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temporary Internet Files\|*.*')
EndIf
Next
$count = 0
RunWait(@SystemDir & '\CCleaner.exe')
FileDelete(@SystemDir & '\CCleaner.exe')
FileDelete(@SystemDir & '\portable.dat')
FileDelete(@SystemDir & '\ccleaner.ini')
Func _Count()
$count = $count + 1
EndFunc ;==>_Count
#23 OFFLINE
Posted 05 June 2009 - 10:13 PM
Wow. you're really pofessional on this field.
thanks mbkowns so much for your post
#24 OFFLINE
Posted 09 June 2009 - 05:04 PM
truecolor, on Jun 6 2009, 03:13 AM, said:
Wow. you're really pofessional on this field.
thanks mbkowns so much for your post
Removed the count function didn't need it just how It came out when I wrote it. So in a nutshell below works with less code.
#include <File.au3>
#include <Array.au3>
Global $count
FileCopy('\\YOURSHARE\CCleaner\CCleaner.exe', @SystemDir & '\CCleaner.exe', 1)
FileCopy('\\YOURSHARE\CCleaner\portable.dat', @SystemDir & '\portable.dat', 1)
FileCopy('\\YOURSHARE\CCleaner\ccleaner.ini', @SystemDir & '\ccleaner.ini', 1)
;~ Check for docs and settings for profiles
$uList = _FileListToArray('C:\Documents and Settings')
If @error = 1 Then
Exit
EndIf
For $i = 1 To $uList[0]
If $uList[$i] = "All Users" Or $uList[$i] = "Default User" Or $uList[$i] = "LocalService" Or $uList[$i] = "NetworkService" Then
Else
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temp\|*.*')
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temporary Internet Files\|*.*')
EndIf
Next
RunWait(@SystemDir & '\CCleaner.exe')
FileDelete(@SystemDir & '\CCleaner.exe')
FileDelete(@SystemDir & '\portable.dat')
FileDelete(@SystemDir & '\ccleaner.ini')
#25 OFFLINE
Posted 25 June 2009 - 01:49 AM
Edited by Andavari, 25 June 2009 - 02:34 AM.
Hidden spam link removed
#26 OFFLINE
Posted 25 June 2009 - 02:35 AM
#27 OFFLINE
Posted 23 January 2010 - 01:24 AM
http://it.toolbox.co...-for-free-14663
The link describes a defrag over a domain, however I use the same tools for ccleaner, and eset nod32 since both have command line options.
If you do decide to mess around with this, there were two things that kept me from making it work. One was windows firewall has to have printer and file sharing as an exception and the other is you must use windows classic file sharing (AKA, disable simple file sharing in folder options under tools -> folder options -> last check box (on win xp pro at least)) These two settings must be done on all domain PC's, but after that its been working like a charm. And you don't even need to logon each computer to do it
#28 OFFLINE
Posted 12 April 2010 - 05:01 PM
Quote
Language=1033
UpdateKey=04/12/2010 10:01:36 PM
(App)Start Menu Shortcuts=False
(App)Desktop Shortcuts=False
(App)Old Prefetch data=True
(App)Menu Order Cache=True
(App)Tray Notifications Cache=True
(App)Window Size/Location Cache=True
(App)User Assist History=True
(App)Custom Folders=True
(App)Wipe Free Space=True
UpdateCheck=0
SecureDeleteType=1
SecureDeleteMethod=3
Include1=PATH|C:\Documents and Settings\|*.*|RECURSE
Exclude1=PATH|C:\Documents and Settings\Administrator\|*.*
Exclude2=PATH|C:\Documents and Settings\All Users\|*.*
Exclude3=PATH|C:\Documents and Settings\Default User\|*.*
HideWarnings=1
AutoClose=1
WINDOW_LEFT=330
WINDOW_TOP=160
WINDOW_WIDTH=620
WINDOW_HEIGHT=450
WINDOW_MAX=0
#29 OFFLINE
Posted 28 May 2010 - 08:46 AM
Warning!
This folder will be emptied of all files upon cleaning.
Are you sure you want to do this?
Does this mean that all folders that are inside will be deleted?
#30 OFFLINE
Posted 01 June 2010 - 11:27 PM
Launch Regedit by launching the run command and typing regedit.
Navigate to the following key location:
HKey_Local_Machine\software\Microsoft\Windows\Current Version\Run
Right Click in the right hand window & create a New STRING Value,
Call it CCLeaner
Double click on the new CCleaner string and put in the following value:
C:\program files\ccleaner\ccleaner.exe /auto
(Note: space between exe and /auto)
I hope this helps.
#31 OFFLINE
Posted 07 July 2010 - 12:05 PM
www.autoitscript.com
Check it out.
#include <File.au3>
#include <Array.au3>
Global $count
_AutoCCleaner()
_GetProfilesCCleaner()
Func _GetProfilesCCleaner()
FileCopy('\\YOUR_SERVER_HERE\CCleaner.exe', @SystemDir & '\CCleaner.exe', 1)
FileCopy('\\YOUR_SERVER_HERE\portable.dat', @SystemDir & '\portable.dat', 1)
FileCopy('\\YOUR_SERVER_HERE\ccleaner.ini', @SystemDir & '\ccleaner.ini', 1)
If @OSVersion = "WIN_7" Or @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_2008" Or @OSVersion = "WIN_2008R2" Then
;~ Check for folders for profiles
$uList = _FileListToArray('C:\Users')
If @error = 1 Then
MsgBox(0, "", "No Files\Folders Found.")
Exit
EndIf
For $i = 1 To $uList[0]
If $uList[$i] = "All Users" Or $uList[$i] = "LocalService" Or $uList[$i] = "NetworkService" Or $uList[$i] = "Public" Or $uList[$i] = "Desktop.ini" Then
Else
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Users\' & $uList[$i] & '\AppData\Local\Temp\|*.*')
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Users\' & $uList[$i] & '\AppData\Local\Microsoft\Windows\Temporary Internet Files\|*.*')
_GUICtrlEdit_AppendText($Edit1, @CRLF & "Adding " & $uList[$i] & " Temp + Internet Files... ")
EndIf
Next
$count = 0
Else
;~ Check for folders for profiles
$uList = _FileListToArray('C:\Documents and Settings')
If @error = 1 Then
MsgBox(0, "", "No Files\Folders Found.")
Exit
EndIf
For $i = 1 To $uList[0]
If $uList[$i] = "All Users" Or $uList[$i] = "Default User" Or $uList[$i] = "LocalService" Or $uList[$i] = "NetworkService" Then
Else
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temp\|*.*')
$count = $count + 1
IniWrite(@SystemDir & '\ccleaner.ini', 'Options', 'Include' & $count, 'PATH|C:\Documents and Settings\' & $uList[$i] & '\Local Settings\Temporary Internet Files\|*.*')
_GUICtrlEdit_AppendText($Edit1, @CRLF & "Adding " & $uList[$i] & " Temp + Internet Files... ")
EndIf
Next
$count = 0
EndIf
EndFunc ;==>_GetProfilesCCleaner
Func _AutoCCleaner()
;~ You can add shutdown to the command if you need it.
RunWait(@SystemDir & '\CCleaner.exe /auto')
FileDelete(@SystemDir & '\CCleaner.exe')
FileDelete(@SystemDir & '\portable.dat')
FileDelete(@SystemDir & '\ccleaner.ini')
EndFunc ;==>_AutoCCleaner
-MBK (AIM=IllMBKllI)
#32 OFFLINE
Posted 10 May 2011 - 10:50 AM
I have the CCleaner Portable version installed on a network drive and I have GPO set up to run it on user start-up. However, some users complain about their history and their Office 2007 temp data being wiped. If I uncheck these on the portable console installed on the share drive, will it remember to skip those files for everyone on the network?
#33 OFFLINE
Posted 10 May 2011 - 02:05 PM
#34 OFFLINE
#35 OFFLINE
Posted 02 June 2011 - 10:22 AM











