Jump to content

Window Washer 5.5 AutoIt Routine


Recommended Posts

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!

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...