none
Access a device's properties from the device manager from the command prompt RRS feed

  • Question

  • Hi.

    I've noticed while using Windows 8 that I can retrieve a PCIe endpoint's link speed and width by looking at its properties via the device manager. I would like to know how I can extract this from the command line rather than using the Device manager GUI. I looked into devcon, but I don't see how it can access a device's configuration space. How does Device Manager accomplish this, or how can I do a command on the command line the same way the device manager does it.

    Thanks,

    PJ

    Monday, December 7, 2015 3:17 PM

Answers

All replies

  • Hi Doron,

    That's why I was surprised that I was able to extract that information from the device manager. You need a pci driver to access the config space. I'm going to try and attach a screen shot so that you can see that somehow the device manager is providing the information I am looking for. If I see it in the device manager, I should be able to grab it without the use of a driver.

    Monday, December 7, 2015 9:00 PM
  • these are all properties exposed on the pnp device node, the underlying drivers set the properties and that is it. the user mode application is not reading config space, it is reading the already set properties on the devices

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, December 8, 2015 5:35 PM
  • Doron,

    I figured it out. I used "SetupDiGetDevicePropertyKeys" to get the number of keys for the device, and their pids. Then I used "SetupDiGetDeviceProperty" to extract the actual value. Appreciate the feedback.

    PJ

    Wednesday, December 9, 2015 2:26 AM