focuz
Member
- Reaction score
- 0
- Location
- Detroit, MI
AutoIT autoapp crap (Code Edit 020208)
So I keep seeing these posts about autoit, so I decided to give it a try. I got a little bit of a small script going so I figured I would post it and try and get other members to contribute to it as well so hopefully we can get something that all techs can use. The scripts below, I'm not a programmer in any way so don't mock the primitive coding. And yes I know its basically just a nice batch program with app switches but its the easiest way I could think about doing things.
And again I don't want to be the only participate. So if anyones has more programs they can add please post the code addon so that we can get this growing.
EDIT 01-25-08: Changed system restore/disable code
EDIT 01-27-08: Added in functionality for defrag and running the XP clean manager. To run the clean manager you will need the attached .reg file which imports the sageset:99 settings and also added a GUI.
EDIT 02-02-08: Finished the GUI and added in an automatic install section.
Theirs one spot on swshredder where enter wont select the button and theirs no alt keyboard option, so I get stuck using a mouseclick cordinate, let me know if you guys can think of a better approach.
So I keep seeing these posts about autoit, so I decided to give it a try. I got a little bit of a small script going so I figured I would post it and try and get other members to contribute to it as well so hopefully we can get something that all techs can use. The scripts below, I'm not a programmer in any way so don't mock the primitive coding. And yes I know its basically just a nice batch program with app switches but its the easiest way I could think about doing things.
And again I don't want to be the only participate. So if anyones has more programs they can add please post the code addon so that we can get this growing.
EDIT 01-25-08: Changed system restore/disable code
EDIT 01-27-08: Added in functionality for defrag and running the XP clean manager. To run the clean manager you will need the attached .reg file which imports the sageset:99 settings and also added a GUI.
EDIT 02-02-08: Finished the GUI and added in an automatic install section.
Theirs one spot on swshredder where enter wont select the button and theirs no alt keyboard option, so I get stuck using a mouseclick cordinate, let me know if you guys can think of a better approach.
Code:
#comments-start
*First Aid's Auto Script - 01.26.2008
Autor: Justin Brower (focuz)
E-mail: focuz07@gmail.com
Language: English
OSystem: Windows Xp
Features:
- Run CCleaner, Adware, Spyware and Virus detection
- Defrag Boot-up Files, Main hard-drive and Secondary hard-drive
- Import XP clean manager settings then automatically runs.
Requirements: Legal copy of Microsoft Windows Xp
Enjoy...
#comments-end
; GUI
#include <GUIConstants.au3>
$mainwindow = GUICreate ("First Aid Auto App", 370, 200)
$ParentWin_Pos = WinGetPos($mainwindow, "")
; Menu
$filemenu = GuiCtrlCreateMenu ("File")
$fileitem = GuiCtrlCreateMenuitem ("Open...",$filemenu)
$recentfilesmenu = GuiCtrlCreateMenu ("Recent Files",$filemenu)
$separator1 = GuiCtrlCreateMenuitem ("",$filemenu)
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("?")
$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)
; Buttons
$virus = GuiCtrlCreateButton("Virus Defense", 10, 30, 100, 30)
$opti = GuiCtrlCreateButton("Optimization", 130, 30, 100, 30)
$install = GuiCtrlCreateButton("Installs", 250, 30, 100, 30)
GuiSetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $aboutitem
Msgbox(0,"About","*First Aid's Auto Script" & @LF & "Created on 01.26.2008" & @LF & " " & @LF & "Autor: Justin Brower (focuz)" & @LF & "E-mail: focuz07@gmail.com" & @LF & " " & @LF & "Enjoy...")
Case $msg = $exititem
ExitLoop
Case $msg = $virus
############################
#### Virus Defense #########
############################
;disables system restore
Run("PortableApps\Virus Defense\SystemrestoreDisable\SystemRestore.exe")
WinWaitActive("Enable/Disable System Restore")
Send("{TAB}")
Send("{ENTER}")
WinWaitActive("Done")
Send("{ENTER}")
WinWaitActive("Enable/Disable System Restore")
ProcessClose("SystemRestore.exe")
; automatically runs CCleaner and removes tempfiles, it DOES NOT run the registry scans.
RunWait("PortableApps\Virus Defense\ccleaner\portable.exe /AUTO" )
; automatically runs spybot
RunWait("PortableApps\Virus Defense\Spybot - Search & Destroy\SpybotSD.exe /autoupdate /onlyspyware /autocheck /autofix /autoclose")
; automatically runs ad-aware
RunWait("PortableApps\Virus Defense\adaware\AdAware\Ad-Aware.exe +update +procnuke +cskip /smart")
; automatically runs ClamWim
RunWait("PortableApps\Virus Defense\ClamWin\App\clamwin\bin\ClamWin.exe --mode=scanner --path=c: --remove --close" )
; Finishes the script off with a nice hijackthis log
; If you want it to automatically run and just create a log add in the switch /autolog
RunWait("PortableApps\Virus Defense\hijackthis\HiJackThis.exe" )
WinWaitActive("Enable/Disable System Restore")
Send("{TAB}")
Send("{ENTER}")
Case $msg = $opti
############################
#### Optimization #########
############################
If @HomeDrive = "C:" Then
Dim $Drive1 = "C:\"
Dim $Drive2 = "D:\"
Else
Dim $Drive1 = @HomeDrive & "\"
Dim $Drive2 = "C:\"
EndIf
; Imports custom registry tweaks
$regFile0 = "PortableApps\XP Fixes\Registry Tweaks\tweaks.reg"
RunWait("Regedit /s" & $regFile0)
; automatically runs CCleaner and removes tempfiles, it DOES NOT run the registry scans.
RunWait("PortableApps\Virus Defense\ccleaner\portable.exe /AUTO" )
; Runs Defrag
RunWait("" & $Drive1 & "\WINDOWS\system32\defrag.exe " & $Drive1 & " -f")
RunWait("" & $Drive1 & "\WINDOWS\system32\defrag.exe " & $Drive2 & " -f")
; Runs Clean Manager
$regFile1 = "WINDOWS\sageset99.reg"
RunWait("Regedit /s" & $regFile1)
RunWait("" & $Drive1 & "\WINDOWS\system32\Cleanmgr.exe /Sagerun:99")
Case $msg = $install
$ChildWin = GUICreate("Child GUI", 200, 300, $ParentWin_Pos[0] + 100, $ParentWin_Pos[1] + 100, -1, -1, $mainwindow)
$spybot = GuiCtrlCreateCheckbox("Spybot", 30, 30, 80, 20)
$adaware = GuiCtrlCreateCheckbox("Adaware", 30, 60, 80, 20)
$avg = GuiCtrlCreateCheckbox("AVG", 30, 90, 80, 20)
$7zip = GuiCtrlCreateCheckbox("7 Zip", 30, 120, 80, 20)
$gobutton = GuiCtrlCreateButton("Go!", 50, 200, 100, 30)
GUISetState(@SW_SHOW)
GUISwitch($mainwindow)
While 1
$msg = GUIGetMsg(1)
Select
Case $msg[0] = $GUI_EVENT_CLOSE
;Check if user clicked on the close button of the child window
If $msg[1] = $ChildWin Then
GUISwitch($ChildWin)
GUIDelete()
ElseIf $msg[1] = $mainwindow Then
GUISwitch($mainwindow)
GUIDelete()
Exit
EndIf
case $msg[0] = $gobutton
If BitAnd(GUICtrlRead($spybot), $GUI_CHECKED) Then
RunWait("needed installs\spybot 1.5.exe /silent /norestart")
EndIf
If BitAnd(GUICtrlRead($adaware), $GUI_CHECKED) Then
RunWait("needed installs\aawsepersonal.exe /quiet")
EndIf
If BitAnd(GUICtrlRead($avg), $GUI_CHECKED) Then
RunWait("needed installs\AVG Free 7.5.exe /DONT_START_APPS /NO_AVGW_STARTUP /QUIT_IF_INSTALLED")
EndIf
If BitAnd(GUICtrlRead($7zip), $GUI_CHECKED) Then
RunWait("needed installs\7z457.exe /S ")
EndIf
msgbox(1, "Done", "Installations Complete")
GUISwitch($ChildWin)
GUIDelete()
EndSelect
WEnd
EndSelect
WEnd
GUIDelete()
Exit
Last edited: