Jump to content

Microsoft AntiSpyware (Beta 1)


Recommended Posts

Hello All -

My first post, and first day with AutoIt, have to admit I'm loving it so far, and I've made pretty good progress I think.

I'm working on a script to install Microsoft AntiSpyware (Beta 1). I've got my script working for the entire installation process, however I'm running into problems once the 'Setup Assistant' process begins.

I've attached a screenshot of the screen I'm looking at and running into problems on.

And here is the window info that AutoIt provides when I have my mouse over the 'next' button, as you can see it doesn't provide a controlID:

<WINDOW INFO>

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Microsoft AntiSpyware Setup Assistant

Class: ThunderRT6FormDC

Size: X: 387 Y: 129 W: 575 H: 450

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 912 Y: 552

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x000000 Dec: 0

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 475 Y: 386 W: 85 H: 25

Control ID:

ClassNameNN: ThunderRT6UserControlDC9

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

txtFocus

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Run a spyware scan every night at 2 a.m. (you can modify the time later).

Skip the initial scan

Yes. I want to help fight spyware (recommended).

No.

No.

Yes, help keep me secure (recommended).

Yes, automatically keep Microsoft AntiSpyware updated (recommended).

No.

</WINDOW INFO>

Sooo.. how what do I need to add to my script to make it click on the 'Next' button?

Also, just in case you are interested here is the code that I have used to get this far:

<CODE>

Run("MicrosoftAntiSpywareInstall.exe")

WinWaitActive("Microsoft AntiSpyware", "Welcome to the Installation Wizard for Microsoft AntiSpyware")

Send("{ENTER}")

WinWaitActive("Microsoft AntiSpyware", "Please read the following license agreement carefully.")

Send("!a")

Send("!n")

WinWaitActive("Microsoft AntiSpyware", "If you would like to change the default installation folder")

Send("!n")

WinWaitActive("Microsoft AntiSpyware", "Click Install to begin the installation.")

Send("!i")

WinWaitActive("Microsoft AntiSpyware", "The installation wizard has successfully installed Microsoft AntiSpyware.")

ControlCommand ( "Microsoft AntiSpyware", "The installation wizard has successfully", 3222, "check", "" )

Send("{ENTER}")

WinWaitActive("Microsoft AntiSpyware Setup Assistant", "The installation wizard has successfully installed Microsoft AntiSpyware.")

</CODE>

I hope someone can help...

Thanks,

Jeff

Link to comment
Share on other sites

I haven't figured out the option buttons, but this will "click" the Next button:

ControlSend("Microsoft AntiSpyware Setup Assistant", "", "ThunderRT6UserControlDC9", "{SPACE}")

EDIT: If you want to choose the second option button, try this:

ControlSend($title, "", "ThunderRT6OptionButton2", "{TAB 9}{DOWN 2}")

Edited by CyberSlug
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

Might work :lmao: It's quite annoying that the option buttons change names...

Global $title = "Microsoft AntiSpyware Setup Assistant"

; The "Welcome to the Microsoft AntiSpyware Setup Assistant" Screen
ClickNext()

; Would you like to enable AutoUpdater?  [Yes is checked by default]
ControlSend($title,"","ThunderRT6OptionButton5", "{SPACE 2}");YES
;;;ControlSend($title,"","ThunderRT6OptionButton6", "{SPACE 2}");NO
ClickNext()

; Would you like Real-time Security Agent Protection  [Yes is checked by default]
ControlSend($title,"","ThunderRT6OptionButton4", "{SPACE 2}");YES
;;;ControlSend($title,"","ThunderRT6OptionButton3", "{SPACE 2}");NO
ClickNext()

; Would you like to join the SpyNet community? [Yes is checked by default]
ControlSend($title,"","ThunderRT6OptionButton1", "{SPACE 2}");YES
;;;ControlSend($title,"","ThunderRT6OptionButton2", "{SPACE 2}");NO
;If Yes to the SpyNet communit, there is a Checkbox asking whether to "skip the initial scan"
ControlCommand($title, "", "ThunderRT6CheckBox2", "Check");or "UnCheck" as appropriate
sleep(250)

;YOU CANNOT GO BACK AFTER YOU CLICK FINISH
ClickNext();ACTUALLY THE FINISH BUTTON IN THIS CASE

;### FINAL SCREEN ###
;Checkbox whether to run scan every night at 2 a.m.
ControlCommand($title, "", "ThunderRT6CheckBox1", "Check");or "UnCheck" as appropriate
;I don't know how to tell it to run a scan now...

Exit
Func ClickNext()
   ControlSend($title, "", "ThunderRT6UserControlDC9", "{SPACE}")
   sleep(100)
EndFunc
Edited by CyberSlug
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

Just an update, thanks to the reply from CyberSlug I am able to get the install AND setup wizard to go all the to the VERY last step of the Micrsofot AntiSpyware setup process with the script below. So, just download Microsoft AntiSpyWare and use this script to deploy as you wish.

Also, if anyone can fix the problem with not being able to choose either 'Scan Now' or 'Scan Later' , that would be awesome.. if not, it works pretty well as is, looks like I'm/we're giving the user the option to be in control of when the scan runs, by allowing them to choose 'scan now' 'scan later'.

I'd be interested in seeing a fix for the scan options though..

Here is the code:

; Script Start

Run("MicrosoftAntiSpywareInstall.exe")

; Welcome Wizard, click next

WinWaitActive("Microsoft AntiSpyware", "Welcome to the Installation Wizard for Microsoft AntiSpyware")

Send("{ENTER}")

; Accept license, click next

WinWaitActive("Microsoft AntiSpyware", "Please read the following license agreement carefully.")

Send("!a")

Send("!n")

; Installation folder, click next

WinWaitActive("Microsoft AntiSpyware", "If you would like to change the default installation folder")

Send("!n")

; Ready to install, click 'Install'

WinWaitActive("Microsoft AntiSpyware", "Click Install to begin the installation.")

Send("!i")

; Select Launch Microsoft AntiSpyware and click finish

WinWaitActive("Microsoft AntiSpyware", "The installation wizard has successfully installed Microsoft AntiSpyware.")

ControlCommand ( "Microsoft AntiSpyware", "The installation wizard has successfully", 3222, "check", "" )

Send("{ENTER}")

; First screen of setup wizard summarizing changes

WinWaitActive("Microsoft AntiSpyware Setup Assistant", "")

ControlSend("Microsoft AntiSpyware Setup Assistant", "", "ThunderRT6UserControlDC9", "{SPACE}")

; Enables automatic updates

WinWaitActive("Microsoft AntiSpyware Setup Assistant", "")

ControlSend("Microsoft AntiSpyware Setup Assistant", "", "ThunderRT6UserControlDC9", "{SPACE}")

; Enables real-time security agents

WinWaitActive("Microsoft AntiSpyware Setup Assistant", "")

ControlSend("Microsoft AntiSpyware Setup Assistant", "", "ThunderRT6UserControlDC9", "{SPACE}")

; Joins the SpyNet community

WinWaitActive("Microsoft AntiSpyware Setup Assistant", "")

ControlSend("Microsoft AntiSpyware Setup Assistant", "", "ThunderRT6UserControlDC9", "{SPACE}")

; From this point the user chooses either Scan Now or Scan Later

Edited by Jeffro11821
Link to comment
Share on other sites

Haha.. CyberSlug, I missed your last post before I finished my comments.

Looks like your code is a bit different than mine... I'll have to give yours a look to see if it's better than mine :-)

Also, looks like you have the same 'Scan Now' 'Scan Later' problem that I do

Thanks,

Jeff

Edited by Jeffro11821
Link to comment
Share on other sites

that was fast, theres already an autoit installer for it

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

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