Jump to content

Automated CrapCleaner v1.19.108 script


Recommended Posts

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 faults

Update: 5. Fixed error ( illegal argument 4: "IsDisabled" )

Update: 6. Changed checking if Crap Cleaner exists (by MSLx Fanboy)I

I've created a program that automaticly cleans your pc using the freeware program Crap Cleaner v1.19.108

You 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.au3

Auto_CC_English_v2.0.au3

Edited by Sphaera_ORbis
Link to comment
Share on other sites

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 by Sphaera_ORbis
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by Sphaera_ORbis
Link to comment
Share on other sites

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 by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

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())
Link to comment
Share on other sites

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

<{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") Then

MsgBox(4096, "", "Crap Cleaner does not exist. Please Install..", 5)

Exit

EndIf

Posted the new file..

Edited by Sphaera_ORbis
Link to comment
Share on other sites

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 by Sphaera_ORbis
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by Sphaera_ORbis
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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  :(

<{POST_SNAPBACK}>

Check the new version!!!!

Edited by Sphaera_ORbis
Link to comment
Share on other sites

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 by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

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 active

I'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 by Sphaera_ORbis
Link to comment
Share on other sites

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

NEWHeader1.png

Link to comment
Share on other sites

  • 3 weeks later...

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)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...