Jump to content

SUPERANTISPYWARE


Recommended Posts

Hi Guys

Ive been making a program for myself to autorun superantispyware the portable version as they havent released the command lines yet. I have tested it on windows 7 and it seems to work fine except on the odd occasion it keeps re-running in a loop so it scans cleans then goes back to main menu and re scans etc... and sometimes it doesnt.

My issue is with vista. when i tested it on a friends comp with vista as it was scanning it started to repeatedly press the cancel button. Could you guys pls run and let me know what you think and what findings you get. i bet its something so simple but becaus eive been staring at it for ages im just becoming blind to it lol.

if you donwload the superantispyware portable program from portable sas and put it inthe directory listed below it will determine the file name to run.

Thanks in advance for your help

;set up vars
Local $sasportexe, $sasportrun

;find the full file name as ver numbers may change
$sasportexe = FileFindFirstFile(@ScriptDir & '\health\sas*.com')
$sasportrun = FileFindNextFile($sasportexe) ;set the file name as file to run
FileClose($sasportexe);close the search handle

;run the program
Run(@ScriptDir & "\health\" & $sasportrun)
Sleep(4000) ; Wait for SAS to start                                       ALL SLEEP FUNCTIONS NEEDED DO NOT REMOVE!!!!!

        ;inital welcome screen
        WinActivate("Portable Launcher", "Click here to start")
        WinWaitActive("Portable Launcher", "Click here to start")
        ControlClick("Portable Launcher","Click here to start",1)
        sleep(2000)

;selects the language on selection screen
    If WinExists("SUPERAntiSpyware Language Selection", "OK") Then
        WinActivate("SUPERAntiSpyware Language Selection", "OK")
        WinWaitActive("SUPERAntiSpyware Language Selection", "OK")
        ControlClick("SUPERAntiSpyware Language Selection","OK",1)
        sleep(2500)


    ;sets up the loop while superantispyware is running - when the program closes it will end the loop
While ProcessExists("program.com")
    
    
        ;from main menu this selects the scan button
   If WinExists("SUPERAntiSpyware", "scan") Then
        WinActivate("SUPERAntiSpyware", "scan")
        WinWaitActive("SUPERAntiSpyware", "scan")
        ControlClick("SUPERAntiSpyware","Scan your Computer...",1090)
        sleep(1000)
   EndIf
        ;Selects a full scan option
     If WinExists("SUPERAntiSpyware", "scan") Then
        WinActivate("SUPERAntiSpyware", "scan")
        WinWaitActive("SUPERAntiSpyware", "scan")
        ControlClick("SUPERAntiSpyware","Perform Custom Scan",1073) ;Select full scan   change to 1074 for custom scan and testing code below
        sleep(1000)
    EndIf
    

        ;clicks next button once full scan is selected
    If WinExists("SUPERAntiSpyware", "Perform Complete Scan") Then
        WinActivate("SUPERAntiSpyware", "Perform Complete Scan")
        WinWaitActive("SUPERAntiSpyware", "Perform Complete Scan")
        ControlClick("SUPERAntiSpyware","&Next >",12324)
        sleep(1000)
    EndIf

    ;once scan is co,mpleted summary box opens and clicks to progress to removal screen
    If WinExists("SUPERAntiSpyware Scan Summary", "Potentially harmful items") Then
        WinActivate("SUPERAntiSpyware Scan Summary", "Potentially harmful items")
        WinWaitActive("SUPERAntiSpyware Scan Summary", "Potentially harmful items")
        ControlClick("SUPERAntiSpyware Scan Summary","Potentially harmful items",1)
        sleep(1000)
    EndIf
;nothing found and close
    If WinExists("SUPERAntiSpyware", "OK") Then
        WinActivate("SUPERAntiSpyware", "OK")
        WinWaitActive("SUPERAntiSpyware", "OK")
        ControlClick("SUPERAntiSpyware","OK",2)
        sleep(1000)
        ProcessClose("program.com")
        sleep(1000)
        ProcessClose("program.com") ;sometimes multiple instance found so double close added
    EndIf

        ;all spyware already checked by program so clicks ok to remove found spyware
    If WinExists("SUPERAntiSpyware", "Place a checkmark next to the items you wish to") Then
        WinActivate("SUPERAntiSpyware", "Place a checkmark next to the items you wish to")
        WinWaitActive("SUPERAntiSpyware", "Place a checkmark next to the items you wish to")
        ControlClick("SUPERAntiSpyware","&Next >",12324)
        sleep(1000)
        LogState("Spyware found and removed") ; writes in the log that spyware was found and removed
        $sasmal = 1 ; for cust report as above
    EndIf
        ;stops restart - restart will be required at some point
    If WinExists("SUPERAntiSpyware", "You must reboot to complete the remova") Then
        WinActivate("SUPERAntiSpyware", "You must reboot to complete the remova")
        WinWaitActive("SUPERAntiSpyware", "You must reboot to complete the remova")
        send("!N")
        sleep(1000)
        ;ControlClick("SUPERAntiSpyware","&Next >",12324)
    EndIf
        ;stops restart - restart will be required at some point and say ok i understand restart required
    If WinExists("SUPERAntiSpyware", "Your system is still infected, you must reboot") Then
        WinActivate("SUPERAntiSpyware", "Your system is still infected, you must reboot")
        WinWaitActive("SUPERAntiSpyware", "Your system is still infected, you must reboot")

        ControlClick("SUPERAntiSpyware","OK",2)
        sleep(1000)
        ProcessClose("superantispyware.exe")
        ProcessClose("program.com")
    EndIf

        ;clicks finish once spyware removed - think may have been part of full superantispyware code but so far done no harm so leaving for now lol
    If WinExists("SUPERAntiSpyware", "<B>Quarantined and Removed Items") Then
        WinActivate("SUPERAntiSpyware", "<B>Quarantined and Removed Items")
        WinWaitActive("SUPERAntiSpyware", "<B>Quarantined and Removed Items")

        ControlClick("SUPERAntiSpyware","Finish",12325)
        ProcessClose("superantispyware.exe")
        ProcessClose("program.com")
    EndIf
     Sleep(500) ; let the computer do something

WEnd

Drunken Frat-Boy Monkey Garbage

Link to comment
Share on other sites

The really isn't the place to have this post, you should always ask for help in the General Help and Support forum, Example Scripts is more for things that already fully work....

BUT to help you out a bit, line 25 has an If that there is no EndIf for, so there may be several issues like that. I would highly suggest you get the full Scite package available in the downloads and use CTRL-F5 to check for simple errors like that while testing your code. I would also reccommend a structure more like this for automating an app:

Run(@tempdir&"\TechFaves\Spyware Removal\ad-awareae.exe")
GUICtrlSetData($info, "waiting for ""Select Setup Language"" screen")
Do
    sleep($timedelay)
    if WinExists("Select Setup Language") Then
        WinActivate("Select Setup Language")
        GUICtrlSetData($info, "send ""Enter""")
        sleep($timedelay)
        send("{ENTER}")
        GUICtrlSetData($info, "waiting for installation wizard")
    EndIf
    if WinExists("Ad-Aware - InstallAware Wizard","Next ") Then
        WinActivate("Ad-Aware - InstallAware Wizard","Next ")
        GUICtrlSetData($info, "send ""Enter""")
        sleep($timedelay)
        send("{ENTER}")
        GUICtrlSetData($info, "waiting for ""License Agreement"" screen")
    EndIf
    if WinExists("Ad-Aware - InstallAware Wizard","END USER LICENSE AGREEMENT") Then
        WinActivate("Ad-Aware - InstallAware Wizard","END USER LICENSE AGREEMENT ")
        GUICtrlSetData($info, "select ""Accept"" (send ""Space"")")
        sleep($timedelay)
        send("{SPACE}")
        GUICtrlSetData($info, "send ""Enter""")
        sleep($timedelay)
        send("{ENTER}")
        GUICtrlSetData($info, "3 second pause then send send ""ALT-I"" at ""Confirm"" screen")
        sleep(3000)
        send("!i")
        GUICtrlSetData($info, "waiting for the ""Installation Complete"" screen")
    EndIf
    if WinExists("Ad-Aware - InstallAware Wizard","Restart now") Then
        WinActivate("Ad-Aware - InstallAware Wizard","Restart now")
        GUICtrlSetData($info, "uncheck ""Restart Now"" option (send ""Space"")")
        sleep($timedelay*2)
        send("{SPACE}")
        GUICtrlSetData($info, "send ""Enter""")
        sleep($timedelay*2)
        send("{ENTER}")
        GUICtrlSetData($info, "waiting for ""Update Manager"" to complete")
        Winwait("Update Manager")
        sleep($timedelay)
        WinActivate("Update Manager")
        GUICtrlSetData($info, "waiting for the ""Update Manager""")
    endIf
    if WinExists("Update Manager") then
        GUICtrlSetData($info, "waiting for the ""Update Manager"" to close")
        if not WinExists("Update Manager") then ExitLoop
        winwaitclose("Update Manager")
        ExitLoop   ;done
    EndIf
until 1=2

This code has nothing to do with your project, just an example grabbed from my Ad-Aware SE installation automater. I put the steps within a Do-Until loop so the timing of the window showing up doesn't matter, the script will just keep looking for windows that will come up eventually.

My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.
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...