Sphaera_ORbis Posted May 28, 2005 Posted May 28, 2005 (edited) New release!!, v2.0- Added automated download and install if CCleaner isn't installed.Update: 1. There is an english version Update: 2. Used @ProgramFilesDir Update: 3. Check if Crap Cleaner exists using "If FileExists"Update: 4. Goto cleaning completed after finding no faultsUpdate: 5. Fixed error ( illegal argument 4: "IsDisabled" )Update: 6. Changed checking if Crap Cleaner exists (by MSLx Fanboy)II've created a program that automaticly cleans your pc using the freeware program Crap Cleaner v1.19.108You can set this script in task scheduler to completly automate the process.!Since i'm only able to test this program on my own pc i would like to ask if someone else is able to test this on his/her pc and let me know if they run into any probs..The file is attached to this message..Please reply!.Auto_CC_Dutch_v2.0.au3Auto_CC_English_v2.0.au3 Edited June 1, 2005 by Sphaera_ORbis
MarkMarkMark Posted May 28, 2005 Posted May 28, 2005 Some idea's: Check if Crap cleaner is really installed on the pc.. use @Programfilesdir instead of c:\program files\ You have the dutch version of Crap cleaner.... the script doesnt work on a english 1
Sphaera_ORbis Posted May 28, 2005 Author Posted May 28, 2005 (edited) Some idea's: Check if Crap cleaner is really installed on the pc..use @Programfilesdir instead of c:\program files\You have the dutch version of Crap cleaner.... the script doesnt work on a english 1<{POST_SNAPBACK}>Check if Crap cleaner is really installed on the pc.. (How?) Edited May 28, 2005 by Sphaera_ORbis
Sphaera_ORbis Posted May 29, 2005 Author Posted May 29, 2005 if fileexists.....<{POST_SNAPBACK}>Thanks for your reply, I edited the script so that it pops up a message when Crap Cleaner is installed or not..If anyone has got some more nice idea's let me know..
Mosquitos Posted May 30, 2005 Posted May 30, 2005 I'm always get this error or message... C:\Documents and Settings\Yves\Mijn documenten\Ccleaner\Ccleaner.au3(62,87) : ERROR: ControlCommand() called with illegal argument 4: "IsDisabled" If ControlCommand ("CCleaner", "Herstel geselecteerde fouten...", 4, "IsDisabled", "" ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Yves\Mijn documenten\Ccleaner\Ccleaner.au3 - 1 error(s), 0 warning(s) And if he found no faults he is not going to, "MsgBox ( 64, "Auto-CC", "Cleaning Completed" )" Sapiente vince, rex, noli vincere ferro!
Sphaera_ORbis Posted May 30, 2005 Author Posted May 30, 2005 (edited) ERROR: ControlCommand() called with illegal argument 4: "IsDisabled"Hopefully fixed ...And if he found no faults he is not going to,"MsgBox ( 64, "Auto-CC", "Cleaning Completed" )"Fixed that too ...IT's the best way of debugging, letting others test IT.. Edited May 30, 2005 by Sphaera_ORbis
Mosquitos Posted May 30, 2005 Posted May 30, 2005 (edited) Works perfect now?Nice job Maybe hitman pro can use it now in his script I have the icon of crapcleaner in a attachment. You can use it for compile the script to exe Edited May 30, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
MSLx Fanboy Posted May 30, 2005 Posted May 30, 2005 I don't see a reason why you have a While 1 loop exists at the beginning, I would think that only one warning would be enough can I suggest: If Not FileExists(@ProgramFilesDir & "\CCleaner\ccleaner.exe") Then MsgBox(4096, "", Crap Cleaner does not exist. Please Install..", 5) Exit EndIf I'll compile momentarily Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Sphaera_ORbis Posted May 30, 2005 Author Posted May 30, 2005 (edited) I don't see a reason why you have a While 1 loop exists at the beginning, I would think that only one warning would be enoughcan I suggest:If Not FileExists(@ProgramFilesDir & "\CCleaner\ccleaner.exe") Then MsgBox(4096, "", Crap Cleaner does not exist. Please Install..", 5) Exit EndIfI'll compile momentarily<{POST_SNAPBACK}>Yes, i think it's better the way you suggested.b.t.w you forgot something small.. ;-)If Not FileExists(@ProgramFilesDir & "\CCleaner\ccleaner.exe") ThenMsgBox(4096, "", "Crap Cleaner does not exist. Please Install..", 5)ExitEndIfPosted the new file.. Edited May 30, 2005 by Sphaera_ORbis
Sphaera_ORbis Posted May 30, 2005 Author Posted May 30, 2005 (edited) Works perfect now?Nice job Maybe hitman pro can use it now in his script I have the icon of crapcleaner in a attachment.You can use it for compile the script to exe <{POST_SNAPBACK}>Thanks for the Icon Mosquitos.!! Edited May 30, 2005 by Sphaera_ORbis
Mosquitos Posted May 31, 2005 Posted May 31, 2005 Als hij ontbrekende snelkoppelingen vind in het startmenu of bureaublad bij bestand integriteit (fouten) dan verwijdert hij die fouten niet. If he found missing links in the startmenu or desktop (faults) then he won't delete the faults. Sapiente vince, rex, noli vincere ferro!
Sphaera_ORbis Posted May 31, 2005 Author Posted May 31, 2005 (edited) Als hij ontbrekende snelkoppelingen vind in het startmenu of bureaublad bij bestand integriteit (fouten) dan verwijdert hij die fouten niet.If he found missing links in the startmenu or desktop (faults) then he won't delete the faults.<{POST_SNAPBACK}>Ja, dat heb ik ook een paar keer opgemerkt, waarom hij dit niet doet is voor mij nog een raadsel, misschien is het een bug in Crap Cleaner.Doet Crap Cleaner dat ook als je hem handmatig laat lopen?Yes, i have noticed that a few times, why he doesn't clean those items is a mystery to me, maybe it's a bug inside Crap Cleaner.Does Crap Cleaner do that when you let it run manually? Edited May 31, 2005 by Sphaera_ORbis
Mosquitos Posted June 1, 2005 Posted June 1, 2005 Yes if i do it manually then ccleaner delete the errors. Maybe you can download ccleaner automatic if it does not exist on your computer with Inetget and check for the latest version Something like this in the McAfee Gui script from Six, MHz and Ahmedmb. #Region - Startup Checks dim $FN If Not FileExists(@ScriptDir & '\Files\Scan.exe') Then $search = FileFindFirstFile("sdat*.*") ; If failed to find SDat file then... If $search = -1 Then if MsgBox(4,"McAfee Scanner","SuperDat not found Download it?")=6 Then Chk_Ver($FN) DownLoad_It($FN) Func Chk_Ver(ByRef $FN) $r=InetGet("http://download.nai.com/products/datfiles/4.x/nai/update.ini","update.ini",1,0) if $r=0 then msgbox(0,"Error","Cant conect to internet!!") Exit EndIf $FN=IniRead("update.ini","SuperDat-IA32","FileName","") EndFunc Func DownLoad_It(ByRef $FN) dim $Size $Size=InetGetSize("http://download.nai.com/products/licensed/superdat/english/intel/" & $FN) ProgressOn("McAfee Scanner","Downloading " & $FN & " " & Round( $Size / 1024 / 1024,1) & "MB","",-1,-1,18) $r=InetGet("http://download.nai.com/products/licensed/superdat/english/intel/" & $FN,$FN, 0, 1) if $r=0 then msgbox(0,"Error","Cant conect to internet!!") Exit EndIf While @InetGetActive ;~ GuiCtrlSetData($Prog, @InetGetBytesRead / $Size * 100) ProgressSet(@InetGetBytesRead / $Size * 100,Round( @InetGetBytesRead / $Size * 100,0) & " %") Sleep(250) Wend ProgressOff() EndFunc With a progressbar Sapiente vince, rex, noli vincere ferro!
Sphaera_ORbis Posted June 1, 2005 Author Posted June 1, 2005 (edited) Yes if i do it manually then ccleaner delete the errors.Maybe you can download ccleaner automatic if it does not exist on your computer with Inetget and check for the latest version Something like this in the McAfee Gui script from Six, MHz and Ahmedmb.#Region - Startup Checks dim $FN If Not FileExists(@ScriptDir & '\Files\Scan.exe') Then $search = FileFindFirstFile("sdat*.*") ; If failed to find SDat file then... If $search = -1 Then if MsgBox(4,"McAfee Scanner","SuperDat not found Download it?")=6 Then Chk_Ver($FN) DownLoad_It($FN)Func Chk_Ver(ByRef $FN) $r=InetGet("http://download.nai.com/products/datfiles/4.x/nai/update.ini","update.ini",1,0) if $r=0 then msgbox(0,"Error","Cant conect to internet!!") Exit EndIf $FN=IniRead("update.ini","SuperDat-IA32","FileName","") EndFunc Func DownLoad_It(ByRef $FN) dim $Size $Size=InetGetSize("http://download.nai.com/products/licensed/superdat/english/intel/" & $FN) ProgressOn("McAfee Scanner","Downloading " & $FN & " " & Round( $Size / 1024 / 1024,1) & "MB","",-1,-1,18) $r=InetGet("http://download.nai.com/products/licensed/superdat/english/intel/" & $FN,$FN, 0, 1) if $r=0 then msgbox(0,"Error","Cant conect to internet!!") Exit EndIf While @InetGetActive ;~ GuiCtrlSetData($Prog, @InetGetBytesRead / $Size * 100) ProgressSet(@InetGetBytesRead / $Size * 100,Round( @InetGetBytesRead / $Size * 100,0) & " %") Sleep(250) Wend ProgressOff() EndFuncWith a progressbar <{POST_SNAPBACK}>Check the new version!!!! Edited June 1, 2005 by Sphaera_ORbis
Mosquitos Posted June 1, 2005 Posted June 1, 2005 (edited) Is it possible to run ccleaner silent so that you can work on your computer without that ccleaner appears on your screen? Something like /silent or /verysilent. If Ccleaner exist the script end and not cleaning your pc. Edited June 1, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Sphaera_ORbis Posted June 1, 2005 Author Posted June 1, 2005 (edited) Is it possible to run ccleaner silent so that you can work on your computer without that ccleaner appears on your screen?Something like /silent or /verysilent.If Ccleaner exist the script end and not cleaning your pc.<{POST_SNAPBACK}>I don't really know if that's possible with the way that i've coded the script., you need to have focus on the buttons and i used command's that wait for the windows to become activeI'm going to try that using an option or some sort so that you can choose if you want to run in the background., but i can't garantee it's going to work the way it should..Sorry, Uploaded the wrong set of files!!!! Edited June 2, 2005 by Sphaera_ORbis
Valuater Posted June 2, 2005 Posted June 2, 2005 if the program already exists you can try to put these in Global $fileExists $fileExists = FileExists(@ProgramFilesDir & "\CCleaner\ccleaner.exe") While 1 If $fileExists = 1 then call ("run_program") Exit EndIf If $fileExists = 0 then *************************************************** and ;Section if allready installed Func run_program() Run(@ProgramFilesDir & "\CCleaner\ccleaner.exe") WinWaitActive("CCleaner") **************************************************** and Sleep(300) MsgBox(64, "Auto-CC", "Cleaning Completed") EndFunc Exit nice job........ enjoy
ybouan Posted June 23, 2005 Posted June 23, 2005 Crap Cleaner already has an automated run option: /S after the installer will install silently /AUTO after the exe to clean with defaults What this does not do right now is fix issues and ouput a log... Anyways thanks for the script I' m going to use the example to script a defrag (I can' t beleive no one has made this yet)
PerryRaptor Posted June 24, 2005 Posted June 24, 2005 Why would you need to make a script for Defrag or Cleanmgr? you can schedule these to happen when you want them to run on every PC on the network using the AT.EXE.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now