Jump to content

Spybot v1.3 Window - Reading # of fixed items?


Recommended Posts

What I'm trying to do is have an AutoIt script that will install SpyBot v1.3 and it's include files. Once it is installed on a machine it should then run, scan for spyware, clean up what it found and then exit. I also need to be able to find how many items it cleaned during the scan (for reporting purposes). I've been able to get everything working except for getting how many items it cleaned. I'm running spybot with the "/autocheck /autofix /autoclose" command line options.

At the end of the scan and cleaning there is a window titled "Confirmation" that pops up with "xx problems fixed." and an OK button. I am unable to retrieve the "xx problems fixed." the following way (all that is return is the "OK" from the OK button:

opt("WinDetectHiddenText", 1)
$text = WinGetText("Confirmation", "")
MsgBox(0, "Text read was: ", $text)

I've also tried the following with no output:

opt("WinDetectHiddenText", 1)
$text = ControlGetText("Confirmation", "", "TMessageForm")
MsgBox(0, "Text read was: ", $text)

I get no output when I do that last one. I found the classname of the window using AutoIT Window Spy and is called "TMessageForm".

Is there any other way that I might be able to obtain this text from the window? The only other way I can get reporting data is using the @AppCommonDir\SpyBot\Statistics.ini file....But then I'll have to parse that file and count individual items up....It'd be much easier if I could just read that text out of the window! :idiot:

Any help is appreciated!

--greg

Link to comment
Share on other sites

opt("WinDetectHiddenText", 1)
$text = ControlGetText("Confirmation", "", "TMessageForm")
MsgBox(0, "Text read was: ", $text)
If you want to work with windows classnames you should read about the WinTitleMatchMode option in the helpfile. AFAIR you'll find a few examples there, the code with TMessageForm above is wrong.

Try this:

ControlGetText('Confirmation', '', 'Static1')

Static1 is just a guess but it's worth a try. You can also try Static2 but that's less likely.

Link to comment
Share on other sites

You sound like you are doing something similar to a program I am currently making. I didnt know spybot had those /auto* functions. Thanks for that. I think it will simplify my script a bit.

I havent worked out the reporting yet as I havent gotten that far.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

What I'm trying to do is have an AutoIt script that will install SpyBot v1.3 and it's include files.  Once it is installed on a machine it should then run, scan for spyware, clean up what it found and then exit.  I also need to be able to find how many items it cleaned during the scan (for reporting purposes).  I've been able to get everything working except for getting how many items it cleaned.  I'm running spybot with the "/autocheck /autofix /autoclose" command line options.

At the end of the scan and cleaning there is a window titled "Confirmation" that pops up with "xx problems fixed." and an OK button.  I am unable to retrieve the "xx problems fixed." the following way (all that is return is the "OK" from the OK button:

opt("WinDetectHiddenText", 1)
$text = WinGetText("Confirmation", "")
MsgBox(0, "Text read was: ", $text)

I've also tried the following with no output:

opt("WinDetectHiddenText", 1)
$text = ControlGetText("Confirmation", "", "TMessageForm")
MsgBox(0, "Text read was: ", $text)

I get no output when I do that last one.  I found the classname of the window using AutoIT Window Spy and is called "TMessageForm". 

Is there any other way that I might be able to obtain this text from the window?  The only other way I can get reporting data is using the @AppCommonDir\SpyBot\Statistics.ini file....But then I'll have to parse that file and count individual items up....It'd be much easier if I could just read that text out of the window!  :idiot: 

Any help is appreciated!

--greg

<{POST_SNAPBACK}>

I've had something like this for a while now, not pertaining to the log of what was removed, but running spybot in auto mode. One thing you might want to consider is you don't necessarily have to install spybot each time. It needs one registry entry to run, you can put the files anywhere you like. My fiancee had tons of spyware on her machine at work, they wouldn't do anything about it for some reason. So I made a CD with Ad-Aware (unfortunately not the free version) and Spybot on it that would autorun, the cool part is, both programs have an option to run silently, I turned off the autoit tooltip icon and looking at the computer, you couldn't even tell it was doing anything. She just stuck the disc in, waited for the hard drive light to stop going crazy and took the disc out. The computer ran better ever since. I just fetch the updates for each program from the mirror sites and place them in the proper directory. I don't even have them "installed" on my machine.
Link to comment
Share on other sites

If you want to work with windows classnames you should read about the WinTitleMatchMode option in the helpfile. AFAIR you'll find a few examples there, the code with TMessageForm above is wrong.

Try this:

ControlGetText('Confirmation', '', 'Static1')

Static1 is just a guess but it's worth a try. You can also try Static2 but that's less likely.

<{POST_SNAPBACK}>

I played around with this tonight and no go. Attached is a jpg containing the window spy output and the dialog box that I'm trying to pull the information out of. It doesn't look like there's anyway to get this info. But someone please prove me wrong! :idiot:

--greg

Link to comment
Share on other sites

You sound like you are doing something similar to a program I am currently making. I didnt know spybot had those /auto* functions. Thanks for that. I think it will simplify my script a bit.

I havent worked out the reporting yet as I havent gotten that far.

JS

<{POST_SNAPBACK}>

This script is actually part of a bigger project. I wrote a bunch of scripts back in August for our students in the residence halls (I work at a college of about 8500 students) that we put onto a cd with an autorun menu on it. It basically went through did some checking for MS Windows XP & 2000 service packs and patches, if they weren't installed it would install them, along with uninstalling their current antivirus software and installing our campus licensed version of McAfee v7 Home for the students. There are scripts for running Trend's SysClean and Sohpo's free virus scanners to clean the machine up before patches get installed, turning the XP SP2 firewall on, disabling system restore, etc. Lots of stuff it does. But most of them are all seperate scripts, and I never did anything with spyware removal.

Our deadline for finalizing a cleaning CD for next semester is FAST approaching and I want to integrate all these seperate utilities into 1 "master" application that would run through everything by just running 1 application. It makes it easier for the students to run it, and hopefully see things in action and learn how to keep their machines clean!!! LOL Like that's going to happen. :idiot:

If you want more information on spybot check out the NetIntegration Spybot forums. You'll find all the command line switches there. Just do a search for command line options and you'll find a bunch of stuff on it.

Net-Integration Forums

--greg

Link to comment
Share on other sites

I've had something like this for a while now, not pertaining to the log of what was removed, but running spybot in auto mode. One thing you might want to consider is you don't necessarily have to install spybot each time. It needs one registry entry to run, you can put the files anywhere you like. My fiancee had tons of spyware on her machine at work, they wouldn't do anything about it for some reason. So I made a CD with Ad-Aware (unfortunately not the free version) and Spybot on it that would autorun, the cool part is, both programs have an option to run silently, I turned off the autoit tooltip icon and looking at the computer, you couldn't even tell it was doing anything. She just stuck the disc in, waited for the hard drive light to stop going crazy and took the disc out. The computer ran better ever since. I just fetch the updates for each program from the mirror sites and place them in the proper directory. I don't even have them "installed" on my machine.

<{POST_SNAPBACK}>

I had thought about doing this, but I think we'd rather have the application install locally on the users machine. That way when they call our helpdesk on campus we can walk them over the phone how to run spybot if it's already installed on their machines. It's amazing how fast students will lose a CD. Seems like all 8500 of them lose the CD the day after we hand it out to them!

--greg

Link to comment
Share on other sites

I tried two other spy programs (WinSpy++ v1.6 and WinDowse 5.1) and all I can determine about the window is:

TMessageForm "Information"

TButton "OK"

Are these 'T' controls from Delphi or something? I hear there is a utility called "WinSight32" that comes with Delphi (in the bin folder).... but I don't have Delphi. Anyone have this utility to spy on Delphi controls?

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

I found where you can get a report. It will take mouse clicks to get there. :-/ Other than that it is a pretty comprehensive report.

You can also export it.

Navigation>Tools>View Report... Select which options and click View Report. Then on the next page you can export. Or just copy and paste the text as there is a visible window text :idiot:

Edit: I just found where all the log files are stored. Maybe you would prefer that instead.

"C:\Documents and Settings\All Users\Application Data\Spybot - Search & Destroy\Logs"

Hope I have helped,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I've had something like this for a while now, not pertaining to the log of what was removed, but running spybot in auto mode. One thing you might want to consider is you don't necessarily have to install spybot each time. It needs one registry entry to run, you can put the files anywhere you like. My fiancee had tons of spyware on her machine at work, they wouldn't do anything about it for some reason. So I made a CD with Ad-Aware (unfortunately not the free version) and Spybot on it that would autorun, the cool part is, both programs have an option to run silently, I turned off the autoit tooltip icon and looking at the computer, you couldn't even tell it was doing anything. She just stuck the disc in, waited for the hard drive light to stop going crazy and took the disc out. The computer ran better ever since. I just fetch the updates for each program from the mirror sites and place them in the proper directory. I don't even have them "installed" on my machine.

<{POST_SNAPBACK}>

@archrival

Any chance of sharing this with use. I could really use this. If not, could you share how you got spybot to work without installing it.

-magicboy

Link to comment
Share on other sites

@archrival

Any chance of sharing this with use.  I could really use this.  If not, could you share how you got spybot to work without installing it.

-magicboy

<{POST_SNAPBACK}>

You just copy the needed files and possibly put the proper registry entries in place and whala you didnt have to run the install, though since you can run it from a command line in complete silence I dont really see the need for that.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • 2 months later...

I played around with this tonight and no go.  Attached is a jpg containing the window spy output and the dialog box that I'm trying to pull the information out of.  It doesn't look like there's anyway to get this info.  But someone please prove me wrong!  :lmao: 

--greg

<{POST_SNAPBACK}>

Hey Greg, how's this going. I'm actually trying to replicate the same thing you are. I'm just stuck on the Spybot stuff.

I don't care about the reporting, I'm trying to get it to work.

I have it installing, updating, and scanning. However, the problem I run into is sometimes I get the confirmation, and sometimes I get the window for Spybot asking for permission to run on next bootup.

Anythought on how to check for one of two windows to pop up, like a case statement for an active window?

Link to comment
Share on other sites

Hey Greg, how's this going.  I'm actually trying to replicate the same thing you are.  I'm just stuck on the Spybot stuff.

I don't care about the reporting, I'm trying to get it to work.

I have it installing, updating, and scanning.  However, the problem I run into is sometimes I get the confirmation, and sometimes I get the window for Spybot asking for permission to run on next bootup.

Anythought on how to check for one of two windows to pop up, like a case statement for an active window?

<{POST_SNAPBACK}>

That is certainly possible. I have almost completed my version. For spybot you should just run it in silent mode. (I am going to do it both ways). Use an If statement or a Select statement. I will see what I have and reply shortly.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • 5 months later...

I did eventually figure this out. I just haven't visited the forum to reply back. Sorry to anyone who was waiting for this! But this is what I ended up doing. It will work with a variety of messages (at least ones that I was seeing show up on my spyware infected test machine).

There are 3 functions. One that will install spybot, one that will install the updated includes (from an already extracted spybot_includes.exe file), and 1 that will run spybot. I've put everything below.

Feel free to use it, but please give credit if you use it.

Spybot Install Code:

;*******************************************************************************************
; Install SpyBot
;*******************************************************************************************
Func InstallSpyBot()
    If $DEBUG = 1 Then WriteLog("Checking for SpyBot Installation.")
    $ver = FileGetVersion($SDDIR & "SpybotSD.exe")
    If FileExists($SDDIR & "SpybotSD.exe") Then
       If $DEBUG = 1 Then WriteLog("Spybot is already installed, reinstalling to make sure components are all there.")
;      BlockInput(1)
          If FileSetAttrib($SDDIR & "Includes\*.*", "-AHRS") Then
             If $DEBUG = 1 Then WriteLog("Changing file attributes on " & $SDDIR & "Includes\*.*")
          Else
             If $DEBUG = 1 Then WriteLog("Error changing file attributes on " & $SDDIR & "Includes\*.*")
          EndIf
          RunWait(@ScriptDir & "\SpyBot\spybotsd14.exe /silent /nocancel /components='main,english'")
          FileSetAttrib($SDDIR & "\advcheck.dll", "-R")
          FileCopy(@ScriptDir & "\SpyBot\advcheck.dll", $SDDIR, 1)
          FileSetAttrib($SDDIR & "\advcheck.dll", "-R")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "Language", "REG_SZ", "English")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "WizardRun", "REG_DWORD", "1")
          RegWrite("HKCU\Software\PepiMK Software\SpybotSnD", "WizardRun", "REG_DWORD", "1")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "Path", "REG_SZ", @ProgramFilesDir & "\Spybot - Search & Destroy\")
;      BlockInput(0)
       If $DEBUG = 1 Then WriteLog("Spybot v" & FileGetVersion($SDDIR & "SpybotSD.exe") &" is now installed")
       InstallSpyBotUpdates(@ScriptDir & "\SpyBot\Includes\")
    Else
       If $DEBUG = 1 Then WriteLog("Spybot is not installed.  Installing.")
;      BlockInput(1)
          RunWait(@ScriptDir & "\SpyBot\spybotsd14.exe /silent /components='main,english'")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "Language", "REG_SZ", "English")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "WizardRun", "REG_DWORD", "1")
          RegWrite("HKCU\Software\PepiMK Software\SpybotSnD", "WizardRun", "REG_DWORD", "1")
          RegWrite("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "Path", "REG_SZ", @ProgramFilesDir & "\Spybot - Search & Destroy\")
;      BlockInput(0)
       If $DEBUG = 1 Then WriteLog("Spybot v" & FileGetVersion($SDDIR & "SpybotSD.exe") &" is now installed")
       InstallSpyBotUpdates(@ScriptDir & "\SpyBot\Includes\")
    EndIf
EndFunc

Install Includes:

;*******************************************************************************************
; MANUALLY Install SpyBot Includes and Library Updates
; Copy the updated detections(8/3/05) and the updated check library tools(NOT NEEDED 8/05) to the
; Spybot install folder on the local pc. I do this because Spybot cannot always get to the
; Spybot server on the web to do an update (or a local server).
;
;
; Requires FileCompareDate Function!
;*******************************************************************************************
Func InstallSpyBotUpdates($SourceDir)
    Local $SourceFiles = "*.*"
    Local $DestDir = RegRead("HKEY_USERS\.DEFAULT\Software\PepiMK Software\SpybotSnD", "Path") & "Includes\"
    If @error Then WriteLog("Error!  Couldn't Read HKU\.DEFAULT\Software\PepiMK Software\SpybotSnD\Path")

    ;
    ; Make sure the S&D configuration directory exists first, if not create it
    ;
    If FileExists(@ProgramFilesDir & "\SpyBot - Search & Destroy\SpybotSD.exe") THEN
       If FileExists(@AppDataCommonDir & "\SpyBot - Search & Destroy\") = 0 THEN
          If DirCreate(@AppDataCommonDir & "\SpyBot - Search & Destroy") Then
                WriteLog("Successfully created: " & @AppDataCommonDir & "\SpyBot - Search & Destroy")
          Else
                WriteLog("Error creating: " & @AppDataCommonDir & "\SpyBot - Search & Destroy")
          EndIf
       EndIf

          If FileSetAttrib(@AppDataCommonDir & "\SpyBot - Search & Destroy\Configuration.ini", "-R") Then
         If $DEBUG = 1 Then WriteLog("Removed ReadOnly file attribute on " & @AppDataCommonDir & "\SpyBot - Search & Destroy\Configuration.ini")
          Else
             If $DEBUG = 1 Then WriteLog("SpyBot config file isn't set as readonly - Copying our config file.")
          EndIf
          If FileCopy(@ScriptDir & "\SpyBot\Configuration.ini", @AppDataCommonDir & "\SpyBot - Search & Destroy", 1) Then
                If $DEBUG = 1 Then WriteLog("Successfully copied SpyBot Configuration.")
                  If FileSetAttrib(@AppDataCommonDir & "\SpyBot - Search & Destroy\Configuration.ini", "-R") Then
               If $DEBUG = 1 Then WriteLog("Removed ReadOnly file attribute on " & @AppDataCommonDir & "\SpyBot - Search & Destroy\Configuration.ini")
                Else
                   If $DEBUG = 1 Then WriteLog("SpyBot config file isn't set as readonly after copying from CD.")
                EndIf
          Else
                If $DEBUG = 1 Then WriteLog("Error copying SpyBot Configuration.")
                $results = MsgBox(17, "Error!", "There was a serious error copying the SpyBot configuration file." & @LF & "This is needed in order to continue.  Please check the log file for more information." & @LF & @LF & "You may try continuing with errors by clicking OK or exiting by clicking CANCEL.")
            If $results = 1 Then
                 If $DEBUG = 1 Then WriteLog("User continued after serious error notification of not being able to copy the spyobot config file.")
            ElseIf $result = 2 Then 
                      If $DEBUG = 1 Then WriteLog("User clicked cancel after serious error notification of not being able to copy the spybot config file.  Exiting utility.")
                      Exit
            EndIf
          EndIf
          
          $search = FileFindFirstFile($SourceDir & $SourceFiles)
               ; Check if the search was successful
          If $search = -1 Then
        If $DEBUG = 1 Then WriteLog("Error! Couldn't find the updated definition files in " & $SourceDir & $SourceFiles)
        MsgBox(48,"Error!","A serious error occured." & @LF & "Couldn't find updated definition files." & @LF & "See log file for more information.")
        Exit
          EndIf

          While 1
         $file = FileFindNextFile($search)
         If @error Then ExitLoop
         If (($file = ".") OR ($file = "..")) Then ContinueLoop
;        MsgBox(0, "", "Source: " & $SourceDir & $file & "   Dest: "& $DestDir & $file)

         $result = FileCompareDate($SourceDir & $file, $DestDir & $file)
         Select
           Case $result = 0
              If $DEBUG = 1 Then WriteLog("Error!  An Unknown error occured in $result=0: " & $result & ".")
           Case $result = 1         ; Files are Equal (copy & overwrite anyway)
              If $DEBUG = 1 Then WriteLog("Files are equal, overwriting " & $SourceDir & $file & " to " & $DestDir)
              If FileSetAttrib($DestDir & $file, "-R") Then
                 If $DEBUG = 1 Then WriteLog("Removed read-only attribute on: " & $DestDir & $file)
              Else
                 If $DEBUG = 1 Then WriteLog("File remove readonly attribute FAILED on: " & $DestDir & $file)
              EndIf
              If FileCopy($SourceDir & $file, $DestDir,1) Then
;               If $DEBUG = 1 Then WriteLog("Successfully copied file: " & $file)
;                   If FileSetAttrib($DestDir & $file, "+R") Then
;                      If $DEBUG = 1 Then WriteLog("Set read-only attribute on: " & $DestDir & $file)
;                   Else
;                      If $DEBUG = 1 Then WriteLog("File set readonly FAILED on: " & $DestDir & $file)
;                   EndIf
            Else
                    If $DEBUG = 1 Then WriteLog("Error Copying file: " & $file)
              EndIf
           Case $result = 2         ; File1 is newer than File2
              ; Do nothing...file is newer
              If $DEBUG = 1 Then WriteLog("Existing file is newer - Leaving file " & $DestDir & $file)
;             If FileSetAttrib($DestDir & $file, "+R") Then
;                If $DEBUG = 1 Then WriteLog("Set read-only attribute on: " & $DestDir & $file)
;             Else
;                If $DEBUG = 1 Then WriteLog("File set readonly FAILED on: " & $DestDir & $file)
;             EndIf
           Case $result = 3         ; File1 is older than File2
              If $DEBUG = 1 Then WriteLog("Existing File is older - Copying " & $SourceDir & $file & " to " & $DestDir)
              If FileSetAttrib($DestDir & $file, "-R") Then
                 If $DEBUG = 1 Then WriteLog("Removed read-only attribute on: " & $DestDir & $file)
              Else
                 If $DEBUG = 1 Then WriteLog("File remove readonly attribute FAILED on: " & $DestDir & $file)
              EndIf
              If FileCopy($SourceDir & $file, $DestDir,1) Then
;                   If $DEBUG = 1 Then WriteLog("Successfully copied file: " & $file)
;                   If FileSetAttrib($DestDir & $file, "+R") Then
;                      If $DEBUG = 1 Then WriteLog("Set read-only attribute on: " & $DestDir & $file)
;                   Else
;                      If $DEBUG = 1 Then WriteLog("File set readonly FAILED on: " & $DestDir & $file)
;                   EndIf
              Else
                    If $DEBUG = 1 Then WriteLog("Error Copying file: " & $file)
              EndIf
           Case $result = -1        ; File1 is not found (this should NEVER HAPPEN!)
              If $DEBUG = 1 Then WriteLog("Error!  Source file " & $SourceDir & $file & " was NOT found!!")
           Case $result = -2        ; File2 is not found
              If $DEBUG = 1 Then WriteLog("Dest file not found - Copying " & $SourceDir & $file & " to " & $DestDir)
              If FileCopy($SourceDir & $file, $DestDir,1) Then
                    If $DEBUG = 1 Then WriteLog("Successfully copied file: " & $file)
                    If FileSetAttrib($DestDir & $file, "+R") Then
                       If $DEBUG = 1 Then WriteLog("Set read-only attribute on: " & $DestDir & $file)
                    Else
                       If $DEBUG = 1 Then WriteLog("File set readonly FAILED on: " & $DestDir & $file)
                    EndIf
              Else
                    If $DEBUG = 1 Then WriteLog("Error Copying file: " & $file)
              EndIf
           Case Else
             If $DEBUG = 1 Then WriteLog("An unknown error occured in copying definition files.")
         EndSelect
          WEnd
         ; Close the search handle
          FileClose($search)
    Else
       MsgBox(48,"Error!","A serious error occured." & @LF & @LF & "Couldn't find SpyBot installed on your computer.  See log file for more information.")
       Exit
    EndIf
EndFunc

And finally to run SpyBot:

;*******************************************************************************************
; Run SpyBot
;*******************************************************************************************
Func RunSpyBot()
    If FileExists(@ProgramFilesDir & "\SpyBot - Search & Destroy\SpyBotSD.exe") THEN
;      BlockInput(1)
          Run(@ProgramFilesDir & "\SpyBot - Search & Destroy\SpyBotSd.exe /autoimmunize /autocheck /autofix /autoclose")
          WinWait("Check in progress...")
;BlockInput(0)
        While WinExists("Check in progress...")
            $Title = WinGetTitle("")

; Error Checking
; For Automating
; Windows where S&D
; Can't remove something

            If ((WinActive("Spybot - Search & Destroy")) OR (WinActive("Loading")) OR (WinActive("Check in progress...")) OR (WinActive("Windows Task Manager")) OR (WinActive("Oswego Windows Security"))) THEN
               $blah = 0
;              ContinueLoop
              Else  ; I Found a bad window! Close and Kill it!
;                BlockInput(0)
                           WinClose($Title)
                   Sleep(500)
                           If WinExists($Title) THEN WinKill($Title)
                   Sleep(500)
                           WinActivate("Check in progress...")
;                    BlockInput(1)
            EndIf
            If ProcessExists("IEXPLORE.EXE") Then
;                  BlockInput(0)
                   Sleep(2000)
                   ProcessClose("IEXPLORE.EXE")
;                  BlockInput(1)
            EndIf
            If WinExists("Bad Image") Then
;                  BlockInput(0)
                   Sleep(2000)
                   WinActivate("Bad Image")
                   ControlClick("Bad Image", "", "Button1", "left", 1)
;                  BlockInput(1)
            EndIf
;           If WinExists("classname=32770") Then
;               BlockInput(0)
;                  Sleep(2000)
;               WinActivate("classname=32770")
;               ControlClick("classname=32770", "", "Button1", "left", 1)
;               BlockInput(1)
;           EndIf
            If WinExists("Unable To Locate Component") Then
;                  BlockInput(0)
                   Sleep(2000)
                   WinActivate("Unable To Locate Component")
                   WinActivate("Unable To Locate Component")
                   ControlClick("Unable To Locate Component", "", "Button1", "left", 1)
;                  BlockInput(1)
            EndIf

            If WinExists("Unable To Locate DLL") Then
;                  BlockInput(0)
                   Sleep(2000)
                   WinActivate("Unable To Locate DLL")
                   WinActivate("Unable To Locate DLL")
                   ControlClick("Unable To Locate DLL", "", "Button1", "left", 1)
;                  BlockInput(1)
            EndIf
            If WinExists("Confirmation") then
;              BlockInput(0)
                   Sleep(2000)
               WinActivate("Confirmation")
;              Sleep(1000)
;              TrayTip("Confirmation", "I saw the confirmation screen!",5,1)
;              MsgBox(4096,"","I'm at the End!" & @LF & "Press any key to continue")
               Send("{ENTER}")
;              BlockInput(1)
            EndIf

        ; Tell SpyBot to run at next system startup
        ; TButton2 = Yes
        ; TButton1 = No
            If WinExists("Warning") THEN
;                  BlockInput(0)
                   WinActivate("Warning")
                   Sleep(2000)
;                  Sleep(30000)
                   ControlClick("Warning", "", "TButton1", "left", 1)
;                  MsgBox(4096,"","Press any key to continue")
;                  Sleep(1000)
;                  Send("{ENTER}")
;                  BlockInput(1)
            EndIf

;           Sleep(2000)
        WEnd

;      BlockInput(0)
    Else
       MsgBox(4096, "Error!", "Couldn't locate the SpyBot executable!")
    EndIf
EndFunc
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...