Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all articles
Browse latest Browse all 750

Control Click & Windows Updates

$
0
0

I would like to automate the process of checking for Windows updates after a routine that I am running. I am able to extract the following information from the Windows Updates screen using AutoIT Window Info:

AutoIt         
>>>> Window <<<< Title:  Windows Update Class:  CabinetWClass Position:   1956, 141 Size:   1004, 897 Style:  0x14CF0000 ExStyle:    0x00000100 Handle: 0x000F0F1C >>>> Control <<<< Class:  DirectUIHWND Instance:   3 ClassnameNN:    DirectUIHWND3 Name:   Advanced (Class):   [CLASS:DirectUIHWND; INSTANCE:3] ID: Text:   Position:   0, 35 Size:   988, 801 ControlClick Coords:    58, 103 Style:  0x56000000 ExStyle:    0x00010000 Handle: 0x0008102E >>>> Mouse <<<< Position:   2022, 309 Cursor ID:  0 Color:  0x651C73 >>>> StatusBar <<<< 1:  >>>> ToolsBar <<<< >>>> Visible Text <<<< Address: Control Panel\All Control Panel Items\Windows Update Windows Update ShellView >>>> Hidden Text <<<< &Install updates Turn on &automatic updates &Check for updates &Stop installation Try &again &Restart now &Install now

And when I try to run this command for "Control Click" to automate clicking the "Check for updates" button, I get nothing. Can anyone spot the error? I suspect I need to do something because the text is hidden but I didn't see anything in the help file regarding this.

#include <File.au3> #include <Constants.au3> Run(@ComSpec & ' /c ' & '%windir%\System32\rundll32.exe url.dll,FileProtocolHandler wuapp.exe', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) WinActivate("Windows Update") ControlClick("Windows Update", "", "[CLASS:DirectUIHWND; TEXT:&Check for updates; INSTANCE:3]")

Thanks in advance!

 


Viewing all articles
Browse latest Browse all 750

Latest Images

Trending Articles



Latest Images