Developer question: Listing installed devices on Windows Vista

Discussion in 'Windows Vista Hardware' started by Jon E. Scott, Jan 3, 2007.

  1. Jon E. Scott

    Jon E. Scott Guest

    Don't see a Vista Development newgroup nor can I find anything on this in
    MSDN...

    We have a custom application that lists all devices installed on the system
    by enumerating the HKLM\System\CurrentControlSet\Enum registry key.
    Basically we look for the "Control" key then grab the "DeviceDesc", "Mfg",
    etc. values from the key above it. This has worked fine in all NT-based
    machines to date. However, on Vista machines, we get what looks like the
    INF file names and format identifiers along with the values we only care
    about. A few examples:

    @cdrom.inf,%gencdrom_devdesc%;CD-ROM Drive
    @keyboard.inf,%*pnp0303.devicedesc%;Standard 101/102-Key or Microsoft
    Natural PS/2 Keyboard
    @monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor
    @msmouse.inf,%*pnp0f13.devicedesc%;PS/2 Compatible Mouse
    @usbport.inf,%usb\root_hub20.devicedesc%;USB Root Hub

    What's with the @*.inf and %whatever% in the strings on Windows Vista?
    Where else do I get just the device name/description without all the other
    mess? I don't want to have to write an ugly parser routine to just grab
    everything after the last ";".
     
    Jon E. Scott, Jan 3, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.