Hi All ,
I want to automate driver installation using device manager . I am able to get device manager windows pop up but i am not able to select root tree item .
Please let me know i am missing something given below code
#Include <GuiTreeView.au3>
ShellExecute('devmgmt.msc')
WinWaitActive("Device Manager")
Global $hTree = ControlGetHandle("Device Manager", "", "[Class:SysTreeView32;Instance:1]")
MsgBox(0, "ControlGetHandle Example", "The control handle of Edit1 is: " & $hTree)
$hItem = _GUICtrlTreeView_FindItem($hTree, "Human Interface Device", True)
_GUICtrlTreeView_SelectItem($hTree, $hItem, $TVGN_CARET)
$next = _GUICtrlTreeView_GetNext($hTree, $hItem)
; Focus treeview and Send Enter
ControlFocus("Device Manager", "", $hTree)
ControlSend("Device Manager", "", $hItem, "{ENTER}")
Exit
Thanks and Regards,
Vikram