Jump to content

Recommended Posts

Posted

Hi,

I want to select a specific tab when I pop up system properties but I'm not sure if / how you would do this. Next, I'm going to enter device settings for hardware in windows, is there a way to select a specific branch of the tree structure in those settings?

Thanks for the help in advance,

Fr33m3

Posted

Perhaps you would be better off using devcon.exe for this (command line device manager). I don't see how you will get far using the Device Manager.

This will open the Device Manager and select Monitors.

#Include <GuiTreeView.au3>

$title = "Device Manager"

If NOT WinExists($title) Then
    ShellExecute("devmgmt.msc")
    WinWait($title)
EndIf

WinActivate($title)

$hWnd = ControlGetHandle($title,'','[Class:SysTreeView32]')

$hwndMonitors = _GUICtrlTreeView_FindItem($hWnd, "Monitors", false)

_GUICtrlTreeView_SelectItem($hWnd, $hwndMonitors)

;_GUICtrlTreeView_SetFocused($hWnd, $hwndMonitors, true)
  • 2 weeks later...
Posted

Perhaps you would be better off using devcon.exe for this (command line device manager). I don't see how you will get far using the Device Manager.

This will open the Device Manager and select Monitors.

#Include <GuiTreeView.au3>

$title = "Device Manager"

If NOT WinExists($title) Then
    ShellExecute("devmgmt.msc")
    WinWait($title)
EndIf

WinActivate($title)

$hWnd = ControlGetHandle($title,'','[Class:SysTreeView32]')

$hwndMonitors = _GUICtrlTreeView_FindItem($hWnd, "Monitors", false)

_GUICtrlTreeView_SelectItem($hWnd, $hwndMonitors)

;_GUICtrlTreeView_SetFocused($hWnd, $hwndMonitors, true)
Thank you for the above suggestion regarding devcon. I have been toiling with trying to install INF files for the past day, your suggestion have resolved the problem. Good thing too since I was started to code the manual process of opening up Device Manager and update the driver. :)

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
×
×
  • Create New...