Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Window Washer 5.5 AutoIt Routine

- - - - -

  • Please log in to reply
6 replies to this topic

#1
blinkdt

blinkdt

    Somewhat Knowledgeable

  • Member
  • PipPipPipPip
  • 582 posts
  • Joined 30-September 03
  • OS:Windows 8 x64
  • Country: Country Flag
Been awhile since I've visited this board, it just gets better and better. Was looking for help on installing Webroot's Window Washer, found some references in the forums to include one member who asked that he be PM'd for an AutoIt routine to install this program (but I can no longer locate the thread!). Haven't heard from him, so here's what I came up with:

SplashTextOn, 290, 110, Installation in Progress, Installing Window Washer 5.5...
Sleep, 2000
SplashTextOff

;Install Window Washer 5.5
Run, %systemdrive%\\Extras\\WindowWasher\\setup.exe
Sleep, 500
WinWaitActive, Window Washer, Setup will now install Window Washer
Send, {ENTER}
WinWaitActive, Window Washer Installation, I Agree
Send, {TAB 2}{ENTER}
WinWaitActive, Window Washer, tabOptions
Send, {TAB 4}{DOWN}{SPACE}{TAB 4}{ENTER}
WinWaitActive, Window Washer, tabInstallPath
Send, {TAB 3}{SPACE},{DOWN}{SPACE}{DOWN 3}{SPACE}{TAB 2}{ENTER}
Sleep, 22000
WinWaitActive, Window Washer
LeftClick, 340, 280
WinWaitActive, Window Washer, tabPluginScan
LeftClick, 114, 154
LeftClick, 114, 172
Send, {TAB}{ENTER}
WinWaitActive, Window Washer, Finished
Send, {ENTER}

run, regedit /s "%systemdrive%\\Extras\\WindowWasher\\prefs.reg"
For those not familiar with AutoIt, it is similar to VBS sendkeys, I suppose. I am NOT a coder (I live vicariously through my coder friends) and AutoIt is intuitive enough for me to use.

The prefs.reg file is a combination of two registry entries:
1. [HKEY_CURRENT_USER\Software\Webroot]
2. [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Washer]
@="&Shred Contents"
and
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Washer\Command]
@="\"C:\\Program Files\\Webroot\\Washer\\wwShred.exe\" \"/recycle\""
Note: the entries found in the second instance are drawn from HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}, I just run a search on the default naming convention found when a user right-clicks on the Recyle Bin and discovers the amazingly long name given to the shred option by Window Washer. Yeesh. I suppose one only needs the first entry that actually renames the Recycle Bin text, but hey....

The routine is thrown in to a larger AutoIt routine that is run at reboot. I copy that routine into the Startup folder using a batch file that is activated via RunOnceEx.cmd, which is activated via cmdlines.txt. After some playing around, I was able to get the whole thing to self-destruct at the end of the routine from within the AutoIt routine itself. Whew, hope that's confusing to you, too!
no peace for the wicked, no rest for the good


How to remove advertisement from MSFN

#2
ZoSTeR

ZoSTeR

    Member

  • Member
  • PipPip
  • 227 posts
  • Joined 04-November 03
Using send keys and mouse clicks with coordinates is always a little risky. The safer way is to send commands to the controls (buttons, edit boxes etc).
Use the AutoIt Spy to get their names.

WinWait ("Window Washer 5.5 Setup")
ControlClick ("Window Washer 5.5 Setup", "", "Button1");Continue Setup Yes Button

WinWait ("Window Washer Installation")
ControlClick ("Window Washer Installation", "", "TButton1");I Agree Button

ControlClick ("Window Washer Installation", "", "TCheckBox4");Is unchecked by default
ControlClick ("Window Washer Installation", "", "TCheckBox3")
ControlClick ("Window Washer Installation", "", "TCheckBox2")
ControlClick ("Window Washer Installation", "", "TCheckBox1")

ControlClick ("Window Washer Installation", "", "TButton4");Next Button

ControlSetText ("Window Washer Installation", "", "TEdit1", "C:\Programme\WebWasher" );Change Install Path

ControlClick ("Window Washer Installation", "", "TCheckBox4")
ControlClick ("Window Washer Installation", "", "TCheckBox3")
ControlClick ("Window Washer Installation", "", "TCheckBox2")
ControlClick ("Window Washer Installation", "", "TCheckBox1")

ControlClick ("Window Washer Installation", "", "TButton7");Install Button

Just comment out the options you want to leave checked.

#3
blinkdt

blinkdt

    Somewhat Knowledgeable

  • Member
  • PipPipPipPip
  • 582 posts
  • Joined 30-September 03
  • OS:Windows 8 x64
  • Country: Country Flag
ZoSTeR, very cool, thanks. But when you mention "Use the AutoIt Spy," I'm at a loss. Is 'AutoIt Spy' a reference to the AutoIt Reveal Mode tool, is it a new feature built into version 3, or is it an add-on tool that someone is selling? Sounds great, I have to get my hands on it.
no peace for the wicked, no rest for the good

#4
blinkdt

blinkdt

    Somewhat Knowledgeable

  • Member
  • PipPipPipPip
  • 582 posts
  • Joined 30-September 03
  • OS:Windows 8 x64
  • Country: Country Flag
Spoke too soon, Zoster, found it as part of version 3. I will have to gear up from version 2 and give this a try, thanks again.
no peace for the wicked, no rest for the good

#5
Cee-Kay

Cee-Kay

    Member

  • Member
  • PipPip
  • 126 posts
  • Joined 20-May 04
Thanks ZoSTeR for the script I had never heard of AutoIT before finding this thread!
Most of the script works fine, but I seem to experiencing problems with the 'Install' button :)

Despite copying your script and configuring the specific options, I can't get it to automatically click the 'Install' button -- is this by design?

I would also like to configure the plug-ins settings, I take it I am able to do this just like the other checkbox options as per your script?
AMD Phenom II x3 720 Black Edition // GIGABYTE GA-MA790FXT-UD5P // Sapphire HD 4770 512MB // Mushkin Xtreme 996657 4GB (2x2GB) // WD Raptor 150GB // Corsair HX620W // Antec Three Hundred

Secunia Software Inspector // Filehippo Update Checker

#6
ZoSTeR

ZoSTeR

    Member

  • Member
  • PipPip
  • 227 posts
  • Joined 04-November 03
The script above is not complete. It's an example of how to manipulate controls with AutoIt.
Sometimes AutoIt is a little fast with clicking the controls. Try adding a Sleep (500) before each command and see if that works.

Use the AutoIt Spy to get the rest of the control names and follow the scheme in the script.

#7
Cee-Kay

Cee-Kay

    Member

  • Member
  • PipPip
  • 126 posts
  • Joined 20-May 04

The script above is not complete. It's an example of how to manipulate controls with AutoIt.

Thanks, I understand enough to of your script to see how AutoIT interacts with certain objects.

Sometimes AutoIt is a little fast with clicking the controls. Try adding a Sleep (500) before each command and see if that works.

I tried that for the screens preceeding the 'Install' button and I did notice a slight delay, however the script seems to close when it reaches the screen with the 'Install' button (this happens both when I use the Sleep command and when I don't)

Use the AutoIt Spy to get the rest of the control names and follow the scheme in the script.


Using the AutoIT Spy it lists the 'Install' button as:

Class: TButton7 Text: Next >

Despite the caption being 'Install' would/does this make any difference or am I missing some commands from my script as you said your script is not complete?
AMD Phenom II x3 720 Black Edition // GIGABYTE GA-MA790FXT-UD5P // Sapphire HD 4770 512MB // Mushkin Xtreme 996657 4GB (2x2GB) // WD Raptor 150GB // Corsair HX620W // Antec Three Hundred

Secunia Software Inspector // Filehippo Update Checker




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users