Jump to content

*XPClean One-Click*


Valuater
 Share

Recommended Posts

Automated Cleaner and Optimizer from the original... *XPClean Menu*

Posted Image

v1.0.5

Fixed - Auto-Clean

Fixed - Removal of important Microsoft Office/Outlook "bak" file ( MS is Dumb!)

v1.0.3

Added - Timed Run

now it can run at any set time

...and shutdown if you want!

******

v1.0.2

completely re-written using arrays

now searches for installed programs

downloads to a desktop folder

100 lines shorter

******

v1.0.1 - Trashed

CODE

#comments-start ===============================================================================

*XPClean One-Click* ver 1.0.5 - 06.26.2006

Autor: Robert M @ QT Appraisal

E-mail: XPCleanMenu@aol.com

Language: English

OSystem: Windows Xp

Features: "One-Click" system to Clean-up, Tune-up and Optimize Windows Xp

- Easy check box configure

- Scan Adware, Spyware and Virus detection

- Clean Extended Clean Manager, *XPClean Menu*'s Auto-Clean and CCleaner

- Defrag Boot-up Files, Main hard-drive and Secondary hard-drive

- Shut-Down, Re-Boot, Run at Start-up, Or Run at specific time

Requirements: Legal copy of Microsoft Windows Xp

Construction: Autoit 3.1+ (beta), SciTE 1.69+

Thanks to all, Enjoy...

#comments-end ===============================================================================

#include <GUIConstants.au3>

#include <File.au3>

Dim $x, $rerun, $Splash, $Splash1, $isDLoad, $Welcm, $fig = 0, $time = 2500, $ver = " v1.0.5"

Dim $program[11], $label[11], $arg[11], $process[11], $internet[11], $CBox[11], $Temp_Dir[5], $Del_File[6]

Dim $pbar, $xx = 1, $color = 0x9DCCE7 ; 0xCBD7ED

WinMinimizeAll()

$Logo_jpg = @TempDir & "\1Click.jpg"

FileInstall("C:\XPClean-web\Settings\XPClean-pics\One-Click.jpg", $Logo_jpg, 1) ;source must be literal string

$Sound_lnk = @TempDir & "\Sound_lnk.wav"

FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk, 1)

SplashImageOn("QTasc", $Logo_jpg, 400, 133, -1, -1, 1)

SoundPlay ($Sound_lnk,1)

If @HomeDrive = "C:" Then

Dim $Drive1 = "C:\"

Dim $Drive2 = "D:\"

Else

Dim $Drive1 = @HomeDrive & "\"

Dim $Drive2 = "C:\"

EndIf

; Programs

$program[0] = 10

$program[1] = @ProgramFilesDir & "\Lavasoft\Ad-Aware SE Professional\Ad-Aware.exe"

$program[2] = @ProgramFilesDir & "\Spybot - Search & Destroy\SpybotSD.exe"

$program[3] = @ProgramFilesDir & "\Windows defender\mpcmdrun.exe"

$program[4] = @ProgramFilesDir & "\Grisoft\AVG Free\avgscan.exe"

$program[5] = "Function"

$program[6] = @SystemDir & "\Cleanmgr.exe"

$program[7] = @ProgramFilesDir & "\CCleaner\ccleaner.exe"

$program[8] = @SystemDir & "\Defrag.exe"

$program[9] = @SystemDir & "\Defrag.exe"

$program[10] = @SystemDir & "\Defrag.exe"

; Labels

$label[0] = 10

$label[1] = "Ad-Aware SE"

$label[2] = "SpyBot S&&D"

$label[3] = "Windows Defender"

$label[4] = "AVG Anti-Virus"

$label[5] = "*XPClean* Auto-Run"

$label[6] = "Clean Manager"

$label[7] = "Crap-Cleaner"

$label[8] = "Defragment Boot Files"

$label[9] = "Defragment " & $Drive1 & " Drive"

$label[10] = "Defragment " & $Drive2 & " Drive"

; Arguments

$arg[0] = 10

$arg[1] = " +nodefnotice +silent +update +procnuke +cskip"

$arg[2] = " /minimize /autoupdate /autoimmunize /onlyspyware /autocheck /autofix /autoclose"

$arg[3] = " scan scantype 1 signatureupdate"

$arg[4] = " C:\ /SMART /CLEAN /MEM"

$arg[5] = "XPClean";Function Call

$arg[6] = " /Sagerun:99"

$arg[7] = " /AUTO"

$arg[8] = " " & $Drive1 & " -b"

$arg[9] = " " & $Drive1 & " -f"

$arg[10] = " " & $Drive2 & " -f"

; Process ID

$process[0] = 10

$process[1] = "Ad-Aware.exe"

$process[2] = "SpybotSD.exe"

$process[3] = "mpcmdrun.exe,MsMpEng.exe"

$process[4] = "avgscan.exe"

$process[5] = ""; n/a - Function

$process[6] = "Cleanmgr.exe"

$process[7] = "ccleaner.exe"

$process[8] = "Defrag.exe,dfrgntfs.exe"

$process[9] = "Defrag.exe,dfrgntfs.exe"

$process[10] = "Defrag.exe,dfrgntfs.exe"

; Internet Locations

$internet[0] = 10

$internet[1] = "http://downloads.pcworld.com/pub/new/privacy___security/anti_spyware_tools/aawsepersonal.exe"

$internet[2] = "http://downloads.pcworld.com/pub/new/privacy___security/anti_spyware_tools/spybotsd14.exe"

$internet[3] = "http://www.microsoft.com/athome/security/spyware/software/default.mspx" ; requires validation

$internet[4] = "http://free.grisoft.com/softw/70free/setup/avg71free_394a757.exe"

$internet[5] = "http://www.xpcleanmenu.hostrocket.com/XPClean-Install.exe"; link to full program

$internet[6] = ""; built-in

$internet[7] = "http://download.ccleaner.com/ccsetup130.exe"

$internet[8] = ""; built-in

$internet[9] = ""; built-in

$internet[10] = ""; built-in

; XPClean Folders

$Temp_Dir[0] = 4

$Temp_Dir[1] = @HomeDrive & "\Temp\"

$Temp_Dir[2] = @UserProfileDir & "\Local Settings\Temp\"

$Temp_Dir[3] = @UserProfileDir & "\Recent\"

$Temp_Dir[4] = @UserProfileDir & "\Local Settings\Temporary Internet Files\Content.IE5\"

; XPClean File Types ; exceptions - "Microsoft" in string

$Del_File[0] = 5

$Del_File[1] = "\*.bak"

$Del_File[2] = "\*.old"

$Del_File[3] = "\*.tmp"

$Del_File[4] = "\*.dmp"

$Del_File[5] = "\*.gid"

$runtime = IniRead(@ScriptDir & "\XPClean1.ini", "Options", "RunTime", "Off")

; Start Script

Opt("TrayMenuMode", 1)

Opt("TrayOnEventMode", 1)

$run_tray = TrayCreateItem("Timed Run = " & $runtime)

TrayCreateItem("")

$about_tray = TrayCreateItem("Config *XPClean One-Click*")

TrayItemSetOnEvent(-1, "Set_Run")

TrayCreateItem("")

$donate_tray = TrayCreateItem("Make a Donation")

TrayItemSetOnEvent(-1, "Donation")

TrayCreateItem("")

$exit_tray = TrayCreateItem("Exit *XPClean One-Click*")

TrayItemSetOnEvent(-1, "Set_Exit")

TraySetState()

HotKeySet("{ESC}", "Set_Exit")

Sleep(2000)

SplashOff()

; Check for First Run

If Not FileExists(@ScriptDir & "\XPClean1.ini") Then Welcome()

If Not FileExists(@ScriptDir & "\XPClean1.ini") Then Exit

$fig = 1

If $runtime <> "Off" Then Set_Timed($runtime)

$fig = 0

Set_Run()

$fig = 1

HotKeySet("{F9}", "Set_Run")

$pread = IniRead(@ScriptDir & "\XPClean1.ini", "Settings", "UseCount", 10)

Tray_msg("** PLEASE ** Close all open programs " & @CRLF & @CRLF & "Press ""ESC"" to Exit" & @CRLF & "Press ""F9"" to Configure ")

; Run Cleaners

_FileWriteLog(@ScriptDir & "\SageSET.dat", "*XPClean One-Click* was Initiated")

For $x = 1 To $program[0]

If IniRead(@ScriptDir & "\XPClean1.ini", "Config", $label[$x], "Off") = "On" Then

$pbar = $pbar + $pread

If $x = 5 Then $xx = 2

If $x = 8 Then $xx = 3

AVI_Demo($pbar, "Process: " & $label[$x] & " ")

If $program[$x] = "Function" Then

Call($arg[$x])

ElseIf FileExists($program[$x]) Then

$file = FileGetShortName($program[$x])

RunWait($file & $arg[$x], "", @SW_HIDE)

Else

If $x = 1 And FileExists(@ProgramFilesDir & '\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe') Then

_Adaware()

Else

Tray_msg($label[$x] & " - was not found ")

EndIf

EndIf

GUIDelete($Splash)

Sleep($time)

EndIf

Next

; Script completed

TrayTip("*XPClean One-Click*", " *XPClean One-Click* /- Complete -\", 5, 1)

$xx = 4

AVI_Demo(100, "*XPClean One-Click* /- Complete -\")

_FileWriteLog(@ScriptDir & "\SageSET.dat", "*XPClean One-Click* was Completed" & @CRLF)

Sleep($time * 2)

SoundPlay ($Sound_lnk,1)

GUIDelete($Splash)

GUIDelete($Splash1)

If IniRead(@ScriptDir & "\XPClean1.ini", "Options", "ReBoot", "Off") = "On" Then Shutdown(6)

If IniRead(@ScriptDir & "\XPClean1.ini", "Options", "ShutDown", "Off") = "On" Then Shutdown(13)

Exit

; GUI Functions

Func Welcome()

Local $isDLoad = ""

$Welcm = GUICreate("*XPClean One-Click* " & $ver, 320, 122, 50, 50, BitOR($WS_POPUP, $WS_DLGFRAME), BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))

$xplbl = GUICtrlCreateLabel("*XPClean One-Click* " & $ver, 7, 3, 308, 15, $SS_CENTER + $SS_SUNKEN)

GUICtrlSetBkColor(-1, $color)

$wl1 = GUICtrlCreateLabel("Welcome... to *XPClean One-Click*", 10, 40, 310, 20)

GUICtrlSetFont(-1, 12, 700)

$wl2 = GUICtrlCreateLabel("Please click ok to configure this program", 10, 80, 230, 20)

$ok_btn = GUICtrlCreateButton("&OK", 235, 90, 60, 20)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $ok_btn Then

GUICtrlSetData($wl1, "Scanning: ...Please Wait...")

GUICtrlSetData($wl2, "Searching for installed programs")

$wv1 = GUICtrlCreateAvi(@SystemDir & '\Shell32.dll', 150, 222, 32, '', '', $ACS_AUTOPLAY)

Sleep($time)

For $s = 1 To $program[0]

If $program[$s] = "Function" Then

ContinueLoop

ElseIf Not FileExists($program[$s]) Then

If $s = 1 And FileExists(@ProgramFilesDir & '\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe') Then

; nada

Else

$iMsgBoxAnswer = MsgBox(35, "*XPClean One-Click*", "The Following Program was not Found on your Computer: " & @CRLF & @CRLF & $program[$s] & " " & @CRLF & @CRLF & "Would you like to Download and Install This Free Program? " & @CRLF & @CRLF)

Select

Case $iMsgBoxAnswer = 6 ;Yes

GUICtrlSetState($wv1, $GUI_HIDE)

Download($s, $wl1, $wl2)

GUICtrlSetState($wv1, $GUI_SHOW)

Sleep($time)

$isDLoad = 1

Case $iMsgBoxAnswer = 7 ;No

; nada

Case $iMsgBoxAnswer = 2 ;Cancel

Set_Exit()

EndSelect

EndIf

EndIf

Next

ExitLoop

EndIf

WEnd

If $isDLoad = 1 Then

GUICtrlDelete($wv1)

GUICtrlSetData($wl1, "Please install the downloaded Programs")

GUICtrlSetData($wl2, "Please click ok... then restart after")

Do

$msg1 = GUIGetMsg()

Until $msg1 = $ok_btn

GUIDelete($Welcm)

Run("explorer.exe " & @DesktopDir & "\XPClean-Downloads", "", @SW_MAXIMIZE)

Exit

EndIf

GUICtrlDelete($ok_btn)

GUICtrlDelete($wv1)

If Not FileExists(@ScriptDir & "\SageSET.dat") Then

GUICtrlSetData($wl1, "Please select areas to clean")

GUICtrlSetData($wl2, "Press the *Ok* button...")

RunWait(@ComSpec & " /c" & "Cleanmgr /Sageset:99", "", @SW_HIDE)

_FileWriteLog(@ScriptDir & "\SageSET.dat", "SageSET Setup is complete" & @CRLF)

EndIf

GUICtrlSetData($wl1, "Please select programs to run below")

GUICtrlSetData($wl2, "Press the *Save* button... Then Press Re-start")

$fig = 1

Set_Run()

EndFunc ;==>Welcome

Func Set_Run()

;GUIDelete($Splash1)

Local $S_btn, $S_input, $twait, $slbl, $CBox[11]

$CBox[0] = 10

$Splash1 = GUICreate("*XPClean One-Click* " & $ver, 320, 122, 50, 185, BitOR($WS_POPUP, $WS_DLGFRAME), BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))

GUICtrlCreateLabel("*XPClean One-Click* " & $ver, 7, 3, 308, 15, $SS_CENTER + $SS_SUNKEN)

GUICtrlSetFont( -1, 9, 700)

GUICtrlSetBkColor(-1, $color)

$tab = GUICtrlCreateTab(15, 22, 290, 100)

$tab1 = GUICtrlCreateTabItem(" Auto-Start ")

$RTime = IniRead(@ScriptDir & "\XPClean1.ini", "Settings", "WaitTime", 15)

If $fig = 0 Then

$twait = GUICtrlCreateLabel($RTime, 60, 60, 20, 20)

GUICtrlSetFont(-1, 12, 700)

$slbl = GUICtrlCreateLabel("Seconds to Auto-Start", 80, 60, 250, 20)

GUICtrlSetFont(-1, 12, 700)

$S_btn = GUICtrlCreateButton("&Stop", 25, 90, 60, 20)

Else

$slbl = GUICtrlCreateLabel("Input Seconds to Auto-Start", 50, 60, 250, 20)

GUICtrlSetFont(-1, 12, 700)

$S_input = GUICtrlCreateInput($RTime, 25, 90, 60, 20, $ES_NUMBER)

EndIf

$R_btn = GUICtrlCreateButton("&Re-Start", 95, 90, 60, 20)

$Sv_btn = GUICtrlCreateButton("S&ave", 165, 90, 60, 20)

$Cn_btn = GUICtrlCreateButton("&Cancel", 235, 90, 60, 20)

$tab2 = GUICtrlCreateTabItem(" Scan ")

$CBox[1] = GUICtrlCreateCheckbox(" Ad-Aware SE/Pro ", 35, 52, 110, 15)

$CBox[2] = GUICtrlCreateCheckbox(" Spy-Bot S && D ", 35, 72, 110, 15)

$CBox[3] = GUICtrlCreateCheckbox(" MS Defender ", 35, 92, 110, 15)

$CBox[4] = GUICtrlCreateCheckbox(" AVG - AntiVirus ", 175, 52, 110, 15)

$tab3 = GUICtrlCreateTabItem(" Clean ")

$CBox[5] = GUICtrlCreateCheckbox(" Auto-*XPClean* ", 35, 52, 200, 15)

$CBox[6] = GUICtrlCreateCheckbox(" Clean Manager - Extended ", 35, 72, 200, 15)

$CBox[7] = GUICtrlCreateCheckbox(" CCleaner ", 35, 92, 200, 15)

$tab4 = GUICtrlCreateTabItem(" Defrag ")

$CBox[8] = GUICtrlCreateCheckbox(" " & @HomeDrive & "\ Boot Files ", 35, 52, 200, 15)

$CBox[9] = GUICtrlCreateCheckbox(" " & @HomeDrive & "\ Hard Drive ", 35, 72, 200, 15)

$CBox[10] = GUICtrlCreateCheckbox(" " & $Drive2 & " Hard Drive ", 35, 92, 200, 15)

For $n = 1 To $CBox[0]

If IniRead(@ScriptDir & "\XPClean1.ini", "Config", $label[$n], "Off") = "On" Then GUICtrlSetState($CBox[$n], $GUI_CHECKED)

Next

$tab5 = GUICtrlCreateTabItem(" Options ")

$ck_ShutD = GUICtrlCreateCheckbox(" Shut-Down After .. Or ", 35, 52, 125, 15)

If IniRead(@ScriptDir & "\XPClean1.ini", "Options", "ShutDown", "Off") = "On" Then GUICtrlSetState(-1, $GUI_CHECKED)

$ck_RBoot = GUICtrlCreateCheckbox(" Re-Boot After", 175, 52, 110, 15)

If IniRead(@ScriptDir & "\XPClean1.ini", "Options", "ReBoot", "Off") = "On" Then GUICtrlSetState(-1, $GUI_CHECKED)

$ck_StartUp = GUICtrlCreateCheckbox(" Run at Start-Up ", 35, 72, 200, 15)

If IniRead(@ScriptDir & "\XPClean1.ini", "Options", "StartUp", "Off") = "On" Then GUICtrlSetState(-1, $GUI_CHECKED)

$ck_TRun = GUICtrlCreateCheckbox(" Run at", 35, 92, 60, 15)

$sTRun = StringSplit(IniRead(@ScriptDir & "\XPClean1.ini", "Options", "RunTime", "Off"), ":")

If $sTRun[0] = 2 Then GUICtrlSetState(-1, $GUI_CHECKED)

$ck_Rtime = GUICtrlCreateInput('12', 95, 91, 40, 18, $ES_NUMBER)

If $sTRun[0] = 2 Then GUICtrlSetData(-1, $sTRun[1])

GUICtrlCreateUpdown(-1)

GUICtrlSetLimit(-1, 12, 1)

$ck_am = GUICtrlCreateRadio("am", 150, 92, 32, 15)

If IsArray($sTRun) And $sTRun[0] = 2 Then

If $sTRun[2] = "am" Then GUICtrlSetState(-1, $GUI_CHECKED)

Else

GUICtrlSetState(-1, $GUI_CHECKED)

EndIf

$ck_pm = GUICtrlCreateRadio("pm", 190, 92, 32, 15)

If IsArray($sTRun) And $sTRun[0] = 2 Then

If $sTRun[2] = "pm" Then GUICtrlSetState(-1, $GUI_CHECKED)

EndIf

GUICtrlCreateTabItem("") ; end tabitem definition

GUISetState()

$STime = $RTime

$begin = TimerInit()

$begin2 = TimerInit()

While 1

$dif = TimerDiff($begin) / 1000

$dif2 = TimerDiff($begin2) / 1000

If $fig = 0 Then

If $dif >= $RTime + 1 Then ExitLoop

If $dif2 >= 1 Then

$STime = $STime - 1

GUICtrlSetData($twait, $STime)

$begin2 = TimerInit()

EndIf

EndIf

$msg = GUIGetMsg()

If $msg = $Cn_btn Then

Set_Exit() ;change this

EndIf

If $fig = 0 And $msg = $S_btn Then

$fig = 1

GUICtrlSetState($S_btn, $GUI_HIDE)

GUICtrlSetData($twait, "")

GUICtrlSetData($slbl, " Press Re-Start to Run ")

EndIf

If $msg = $R_btn Then

$rerun = 1

Set_Exit()

EndIf

If $msg = $Sv_btn Then

If $isDLoad = 1 Then GUIDelete($Welcm)

$scount = 0

; Settings

$timewait1 = GUICtrlRead($S_input)

If $timewait1 > 0 Then

IniWrite(@ScriptDir & "\XPClean1.ini", "Settings", "WaitTime", $timewait1)

ElseIf IniRead(@ScriptDir & "\XPClean1.ini", "Settings", "WaitTime", "0") > 0 Then

;

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Settings", "WaitTime", 15)

EndIf

; Config

For $n = 1 To $CBox[0]

If BitAND(GUICtrlRead($CBox[$n]), $GUI_CHECKED) = $GUI_CHECKED Then

$scount = $scount + 1

IniWrite(@ScriptDir & "\XPClean1.ini", "Config", $label[$n], "On")

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Config", $label[$n], "Off")

EndIf

Next

; Settings

If $scount = 0 Then

Tray_msg("Sorry!, No Choices were selected ")

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Settings", "UseCount", StringLeft(95 / $scount, 4))

EndIf

; Options

If BitAND(GUICtrlRead($ck_ShutD), $GUI_CHECKED) = $GUI_CHECKED Then

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "ShutDown", "On")

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "ShutDown", "Off")

EndIf

If BitAND(GUICtrlRead($ck_RBoot), $GUI_CHECKED) = $GUI_CHECKED Then

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "ReBoot", "On")

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "ReBoot", "Off")

EndIf

If BitAND(GUICtrlRead($ck_StartUp), $GUI_CHECKED) = $GUI_CHECKED Then

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "StartUp", "On")

If FileExists(@StartupCommonDir & "\XPClean-One-Click.lnk") Then FileDelete(@StartupCommonDir & "\XPClean-One-Click.lnk")

If @Compiled = 1 Then

FileCreateShortcut(@ScriptDir & "\XPClean-One-Click.exe", @StartupCommonDir & "\XPClean-One-Click.lnk", @ScriptDir, "", "This is an *XPClean One-Click* link 8)", "", "", "", @SW_SHOWNORMAL)

Else

FileCreateShortcut(@ScriptDir & "\XPClean-One-Click.au3", @StartupCommonDir & "\XPClean-One-Click.lnk", @ScriptDir, "", "This is an *XPClean One-Click* link 8)", "", "", "", @SW_SHOWNORMAL)

EndIf

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "StartUp", "Off")

If FileExists(@StartupCommonDir & "\XPClean-One-Click.lnk") Then FileDelete(@StartupCommonDir & "\XPClean-One-Click.lnk")

EndIf

If BitAND(GUICtrlRead($ck_TRun), $GUI_CHECKED) = $GUI_CHECKED Then

If BitAND(GUICtrlRead($ck_am), $GUI_CHECKED) = $GUI_CHECKED Then

$ampm = "am"

Else

$ampm = "pm"

EndIf

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "RunTime", GUICtrlRead($ck_Rtime) & ":" & $ampm)

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "StartUp", "On")

If FileExists(@StartupCommonDir & "\XPClean-One-Click.lnk") Then FileDelete(@StartupCommonDir & "\XPClean-One-Click.lnk")

If @Compiled = 1 Then

FileCreateShortcut(@ScriptDir & "\XPClean-One-Click.exe", @StartupCommonDir & "\XPClean-One-Click.lnk", @ScriptDir, "", "This is an *XPClean One-Click* link 8)", "", "", "", @SW_SHOWNORMAL)

Else

FileCreateShortcut(@ScriptDir & "\XPClean-One-Click.au3", @StartupCommonDir & "\XPClean-One-Click.lnk", @ScriptDir, "", "This is an *XPClean One-Click* link 8)", "", "", "", @SW_SHOWNORMAL)

EndIf

$rerun = 1

Else

IniWrite(@ScriptDir & "\XPClean1.ini", "Options", "RunTime", "Off")

EndIf

If $scount = 0 Then

FileDelete(@ScriptDir & "\XPClean1.ini")

Else

Tray_msg("Great!, Your settings have been saved ")

If $rerun = 1 Then

Tray_msg("Great!, Run at " & GUICtrlRead($ck_Rtime) & ":00 " & $ampm & " has been set" & @CRLF & "the program will now re-start... thank you ")

Set_Exit()

EndIf

EndIf

$STime = IniRead(@ScriptDir & "\XPClean1.ini", "Settings", "WaitTime", 15) + 1

$begin = TimerInit()

EndIf

WEnd

GUIDelete($Splash1)

EndFunc ;==>Set_Run

Func AVI_Demo($sx, $proc)

GUIDelete($Splash)

$Splash = GUICreate("*XPClean One-Click* " & $ver, 320, 122, 50, 50, BitOR($WS_POPUP, $WS_DLGFRAME), BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))

GUISetCursor(15, 1)

GUICtrlCreateLabel("*XPClean One-Click* " & $ver, 7, 3, 308, 15, $SS_CENTER + $SS_SUNKEN)

GUICtrlSetFont( -1, 9, 700)

GUICtrlSetBkColor(-1, $color)

GUICtrlCreateLabel('', 7, 20, 308, 83, $SS_SUNKEN)

If $xx = 1 Then GUICtrlCreateAvi(@SystemDir & '\Shell32.dll', 165, 22, 22, '', '', $ACS_AUTOPLAY)

If $xx = 2 Then GUICtrlCreateAvi(@SystemDir & '\Shell32.dll', 164, 10, 22, '', '', $ACS_AUTOPLAY)

If $xx = 3 Then GUICtrlCreateAvi(@SystemDir & '\Shell32.dll', 160, 22, 22, '', '', $ACS_AUTOPLAY)

If $xx = 4 Then GUICtrlCreateAvi(@SystemDir & '\Shell32.dll', 150, 112, 32, '', '', $ACS_AUTOPLAY)

$xplbl = GUICtrlCreateLabel($proc, 22, 85, 280, 15, $SS_CENTER)

GUICtrlCreateLabel($sx & "%", 7, 105, $sx * 3.08, 15, $SS_CENTER + $SS_SUNKEN)

GUICtrlSetBkColor(-1, $color)

GUISetState()

EndFunc ;==>AVI_Demo

Func Greet()

$glbl = " Loading: "

$Greet = GUICreate("*XPClean One-Click* " & $ver, 320, 122, 50, 50, BitOR($WS_POPUP, $WS_DLGFRAME), BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))

GUISetCursor(15, 1)

GUICtrlCreateLabel("Presented by - QTasc ", 7, 3, 308, 15, $SS_CENTER + $SS_SUNKEN)

GUICtrlSetFont( -1, 9, 700)

GUICtrlSetBkColor(-1, $color)

GUICtrlCreateLabel('', 7, 20, 308, 83, $SS_SUNKEN)

;GUICtrlSetBkColor(-1, $color)

GUICtrlSetState( -1, $GUI_DISABLE )

GUICtrlCreatePic($Logo_jpg, 60, 20, 205, 82)

$glbl1 = GUICtrlCreateLabel($glbl, 7, 105, 308, 15, $SS_SUNKEN)

GUICtrlSetBkColor(-1, $color)

GUISetState()

SoundPlay ($Sound_lnk)

for $g = 1 to 30

$glbl = $glbl & "> "

GUICtrlSetData( $glbl1, $glbl)

Sleep(100)

Next

GUIDelete($Greet)

EndFunc ;==>AVI_Demo

; General Functions

Func Download($d, ByRef $wl1, ByRef $wl2)

$ck_type = StringRight($internet[$d], 3)

If $ck_type = "exe" Then ; download exe file

If Not FileExists(@DesktopDir & "\XPClean-Downloads") Then DirCreate(@DesktopDir & "\XPClean-Downloads")

InetGet($internet[$d], @DesktopDir & "\XPClean-Downloads\" & $label[$d] & "_Setup.exe", 1, 1)

GUICtrlSetData($wl2, "DownLoading... " & $label[$d])

While @InetGetActive

GUICtrlSetData($wl1, "Download: Bytes = " & StringLeft(@InetGetBytesRead / 1000 / 1000, 3) & "MB")

Sleep(250)

WEnd

GUICtrlSetData($wl2, "Searching for installed programs")

GUICtrlSetData($wl1, "Scanning: ...Please Wait...")

Sleep($time)

ElseIf $ck_type = "zip" Then ; download zip file

If Not FileExists(@DesktopDir & "\XPClean-Downloads") Then DirCreate(@DesktopDir & "\XPClean-Downloads")

InetGet($internet[$d], @DesktopDir & "\XPClean-Downloads\" & $label[$d] & "_Setup.zip", 1, 1)

GUICtrlSetData($wl2, "DownLoading... " & $label[$d])

While @InetGetActive

GUICtrlSetData($wl1, "Download: Bytes = " & StringLeft(@InetGetBytesRead / 1000 / 1000, 3) & "MB")

Sleep(250)

WEnd

GUICtrlSetData($wl2, "Searching for installed programs")

GUICtrlSetData($wl1, "Scanning: ...Please Wait...")

Sleep($time)

Else ; runs a web page

Run(@ComSpec & " /c Start " & $internet[$d], "", @SW_HIDE)

EndIf

EndFunc ;==>Download

Func Tray_msg($Recv)

TraySetState(4)

TrayTip("*XPClean One-Click*", $Recv, 5, 1)

Sleep($time * 3)

TraySetState(8)

TrayTip("", "", "")

EndFunc ;==>Tray_msg

Func Donation()

Run(@ComSpec & " /c Start https://www.paypal.com/xclick/business=xpcl...+Donation", "", @SW_HIDE)

WinWaitActive("")

EndFunc ;==>Donation

Func Set_Exit()

GUIDelete($Splash)

GUIDelete($Splash1)

$xx = 4

AVI_Demo(100, "**** Closing Process ****")

Tray_msg( "**** Terminate Initiated **** ")

_FileWriteLog(@ScriptDir & "\SageSET.dat", "*XPClean One-Click* was Terminated" & @CRLF)

$PID = StringSplit($process[$x], ",")

For $c = 1 To $PID[0]

ProcessClose($PID[$c])

Sleep($time) ; wait for last process to finish...

Next

If $rerun = "" Then SoundPlay ($Sound_lnk,1)

If $rerun = "" Then Exit

; Re-Run

If @Compiled = 1 Then

Run( FileGetShortName(@ScriptFullPath))

Else

Run( FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath))

EndIf

Exit

EndFunc ;==>Set_Exit

Func Set_Timed($rt)

$split = StringSplit($rt, ":")

If $split[0] <> 2 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

Tray_msg("Timed Run is Set at " & $split[1] & ":00 " & $split[2] & @CRLF & "and will be initiated at the scheduled time... thank you ")

While 1

$hour = @HOUR

If $hour >= 1 And $hour <= 12 Then

$amp = "am"

ElseIf $hour >= 13 Then

$amp = "pm"

$hour = $hour - 12

Else ; 00 - for 24th hour

$hour = 12

$amp = "am"

EndIf

If $hour = $split[1]And $amp = $split[2] And @MIN <=2 Then ExitLoop

Sleep($time * 10)

WEnd

EndFunc ;==>Set_Timed

; Cleaning Functions

Func XPClean()

For $t = 1 To $Temp_Dir[0]

$fHandle = FileFindFirstFile($Temp_Dir[$t] & "*.*")

If $fHandle >= 0 Then

While 1

$result = FileFindNextFile($fHandle)

If @error Then ExitLoop

If $result <> "." And $result <> ".." Then

If StringInStr(FileGetAttrib($Temp_Dir[$t] & $result), "D") Then

DirRemove($Temp_Dir[$t] & $result, 1)

Else

FileDelete($Temp_Dir[$t] & $result)

EndIf

EndIf

WEnd

FileClose($fHandle)

EndIf

Next

For $t = 1 To $Del_File[0]

RunWait(@ComSpec & ' /c ' & 'dir "' & @HomeDrive & $Del_File[$t] & '" /a :h /b /s' & ' > "' & @ScriptDir & '\dir.txt"', '', @SW_HIDE)

Sleep(2000)

$hFile = FileOpen(@ScriptDir & "\dir.txt", 0)

If $hFile = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Return

EndIf

While 1

$sLine = FileReadLine($hFile)

If @error = -1 Then ExitLoop

If StringInStr($sLine, "Microsoft") Then ContinueLoop

If $sLine <> "" Then

FileDelete($sLine)

EndIf

WEnd

FileClose($hFile)

FileDelete(@ScriptDir & '\dir.txt')

Next

EndFunc ;==>XPClean

Func _Adaware() ; Personal

; Thanks SmOke_N

Local $AdAwareTitle = 'Ad-Aware SE Personal'

Local $AdAwareChildTitle = 'Ad-Aware SE'

Local $ScanChoice = 'TRadioButton2'

Local $Click = 0, $push = ""

If Not ProcessExists('Ad-Aware.exe') Then

InetGet("http://updates.ls-servers.com/public/defs.ref", "C:\Program Files\Lavasoft\Ad-Aware SE Personal\defs.ref", 1)

$PID = Run(@ProgramFilesDir & '\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe')

EndIf

WinWait($AdAwareTitle)

While ProcessExists('Ad-Aware.exe')

If Not ProcessExists('Ad-Aware.exe') Then Return

Sleep(250)

If $Click = 0 Then

If ControlCommand($AdAwareTitle, '', 'TPageControl1', 'IsVisible', '') Then; First page

WinSetState($AdAwareTitle, '', @SW_MINIMIZE)

ControlClick($AdAwareTitle, '', 'TACimage16')

$Click = 1

ContinueLoop

EndIf

EndIf

If $Click = 1 Then

If ControlCommand($AdAwareTitle, '', 'TACGFXcheckbox3', 'IsVisible', '') Then; 2nd page

ControlClick($AdAwareTitle, '', 'TACimage16')

$Click = 2

EndIf

EndIf

If $Click = 2 Then

Do

Sleep(100)

Until ControlCommand($AdAwareTitle, '', 'TACimage15', 'IsVisible', '')

$Click = 3

ContinueLoop

EndIf

If $Click = 3 Then

ControlClick($AdAwareTitle, '', 'TACimage16')

$Click = 4

ContinueLoop

EndIf

If $Click = 4 Then

If ControlCommand($AdAwareTitle, '', 'TAdvTabSet1', 'IsVisible', '') Then

ControlClick($AdAwareTitle, '', 'TVirtualStringTree1', 'Right', 1)

ControlSend($AdAwareTitle, '', 'TVirtualStringTree1', '{DOWN 2}' & '{ENTER}')

ControlClick($AdAwareTitle, '', 'TACimage16')

$Click = 5

ContinueLoop

Else

$Click = 6

ContinueLoop

EndIf

EndIf

If $Click = 5 Then

Local $OPT = Opt('WinTitleMatchMode', 4)

If ControlCommand($AdAwareChildTitle, '', 'TACimage1', 'IsVisible', '') Then

ControlClick($AdAwareChildTitle, '', 'TACimage1')

$Click = 6

Opt('WinTitleMatchMode', $OPT)

ContinueLoop

Else

ControlClick($AdAwareTitle, '', 'TACimage16')

$Click = 6

ContinueLoop

EndIf

EndIf

If $Click = 6 Then

ProcessClose('Ad-Aware.exe')

Do

Sleep(100)

Until Not ProcessExists('Ad-Aware.exe')

EndIf

WEnd

EndFunc ;==>_Adaware

Thanks....

Valuater

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

  • Moderators

Purty!

BTW, the autoit tag isn't picking up #cs? Most of your script is just green to me on here :D

Edit:

P.S. (Call() look out for w0uter :P )

Edit2:

Hey, that Adaware function looks familiar (and I got Kudos :D )

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thanks Guys...

@SmOke

Yea, I knoiw he doesn't like those "call" functions... i just copied then out of XPClean Menu.. I was lucky i could get it all just top work

yea, that was your script ... but it needs a little work on the updates

@Perry

thanks... the actual name is XP clean

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

isn't picking up #cs

It does pick up #comments-start though....

#)

edit: typo: comment-start > comments-start

edit:

#comments-start

Test.... lol

#comments-end
Edited by nfwu
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 4 months later...

I actually love your *XPClean Menu* . I'm due for a cleaning anyways, thanks

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

  • 1 month later...

It seems as though XPClean.au3 is only downloading the updates to Ad-Aware. It happens too quick for it to actually do a scan.

Do I have something configured wrong? Is that what it's supposed to do?

This is my settings file:

[settings]

WaitTime=15

UseCount=47.5

[Config]

Ad-Aware SE=On

SpyBot S&&D=On

Windows Defender=Off

AVG Anti-Virus=Off

*XPClean* Auto-Run=Off

Clean Manager=Off

Crap-Cleaner=Off

Defragment Boot Files=Off

Defragment C:\ Drive=Off

Defragment D:\ Drive=Off

[Options]

ShutDown=Off

ReBoot=Off

StartUp=Off

RunTime=Off

Thank you,

Docfxit

Edited by docfxit
Link to comment
Share on other sites

  • 3 months later...

I just found this autoit scripting utility and the XPCLEAN script yesterday. I wish I had known about both a long time ago.

This script is pretty cool and it will be a great time saver the next time a friend/relative/coworker/neighbor asks me to clean up his/her PC.

I do have a suggestion, though. This could be made even more slick if there were a checkbox to authorize automatic installation of any missing cleanup programs (AVG, Defender, etc.) if the script found they were not installed, and if the script waited for the installations to complete then continued with the cleanup instead of instructing the user to install them manually and restart the cleanup script. Even if a reboot is necessary, it would still be nice to automate the installation of the programs.

Has anyone written/found scripts to install any of the cleanup programs yet? Since I'm new to this, I'd prefer to ask before I spend time re-inventing the wheel. I have searched and I have not found any yet.

Some of the manual cleanups I've done have taken up to 22 hours to complete. I typically run AVG, Spybot, Adaware, CWShredder, Aboutbuster, Coolwebsearch_smartkiller, Defender and then a defrag, that is after installing all missing MS patches. It would be great to install a CD and let it run completely unattended, including downloading and installing any missing programs. Yesterday, I found this http://www.heise-security.co.uk/articles/80682 automatic script that gathers and installs patches. Some of you may find it useful if you haven't found it yet. Between the two scripts, I hope to be able to do cleanups with virtually no user input needed, except between the two processes. Now if we could merge the two scripts together, wow, what a winner.

I'll continue to search for automatic installation scripts and if I find any I'll be happy to pass them on to Valuater to add to the XLClean script if he's interested in adding them.

Thank you for the utility.

Link to comment
Share on other sites

Due to the running of "other's" programs, i chose not to automate the install without user input.

Each program has their own separate, unique, and very individual license agreements.

I chose NOT to get involved with that, and still have no wish to do so.....

Thanks

Valuater

8)

NEWHeader1.png

Link to comment
Share on other sites

  • 3 weeks later...

this is amazing, I was going to make the same exact thing (same programs and everything) only I'm not god at programming with auto it so it was going to be with batch scripting. but you just saved me the trouble and made it look much more professional. Thank you

Edit: Also link for AVG is dead

Edited by AcidCorps
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...