none
Getting name of ClassGuid from Win32_PnPEntity

    Question

  • Hi,

    I am enumerating devices using WMI returned from "Select * From Win32_PnPEntity". 

    The Win32_PnPEntity class defines ClassGuid. AFAIK the ClassGuid is specific for each system and cannot be used as a hardcoded value.

    I need to filter out the devices using their Class name as the name should be fixed one as opposed to the guid.

    How can I extract Class name from Win32_PnPEntity's ClassGuid using WMI?

    Thank you,



    Martin Kulov
    www.kulov.net

    Microsoft Regional Director
    VS ALM MVP, MCT, MCSD, MCPD, INETA Speaker

    Sunday, February 10, 2013 9:30 PM

Answers

  • Ok so ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} here is the well known class of network adapters, at least since WinXP.

    You can find the names of these classes (*setup* classes) somewhere in SDK .h files or just look in regedit on your own machine under HKLM\CCS\Control\Class

    -- pa

    • Marked as answer by Martin Kulov Monday, February 11, 2013 9:06 PM
    Monday, February 11, 2013 9:47 AM

All replies

  • Why do you think that device class GUIDs are specific for each system? They are not. if WMI gives random guids on different machines, it's a WMI problem.

    -- pa


    • Edited by Pavel A Monday, February 11, 2013 12:22 AM
    Monday, February 11, 2013 12:21 AM
  • These are the properties from
     
    wmic path Win32_PnPEntity get /format:list
     
    Availability=
    Caption=isatap.{61096986-C979-46EC-BF3F-94452AC43F34}
    ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318}
    CompatibleID=
    ConfigManagerErrorCode=0
    ConfigManagerUserConfig=FALSE
    CreationClassName=Win32_PnPEntity
    Description=Microsoft ISATAP Adapter
    DeviceID=ROOT\*ISATAP\0014
    ErrorCleared=
    ErrorDescription=
    HardwareID={"*ISATAP"}
    InstallDate=
    LastErrorCode=
    Manufacturer=Microsoft
    Name=isatap.{61096986-C979-46EC-BF3F-94452AC43F34}
    PNPDeviceID=ROOT\*ISATAP\0014
    PowerManagementCapabilities=
    PowerManagementSupported=
    Service=tunnel
    Status=OK
    StatusInfo=
    SystemCreationClassName=Win32_ComputerSystem
    SystemName=SERENITY

    --
    .
    --
    "Martin Kulov" wrote in message news:43525ab7-610b-4a29-a302-1e71b1d9679a...

    Hi,

    I am enumerating devices using WMI returned from "Select * From Win32_PnPEntity". 

    The Win32_PnPEntity class defines ClassGuid. AFAIK the ClassGuid is specific for each system and cannot be used as a hardcoded value.

    I need to filter out the devices using their Class name as the name should be fixed one as opposed to the guid.

    How can I extract Class name from Win32_PnPEntity's ClassGuid using WMI?

    Thank you,



    Martin Kulov
    www.kulov.net

    Microsoft Regional Director
    VS ALM MVP, MCT, MCSD, MCPD, INETA Speaker


    David Candy
    Monday, February 11, 2013 6:29 AM
  • Ok so ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} here is the well known class of network adapters, at least since WinXP.

    You can find the names of these classes (*setup* classes) somewhere in SDK .h files or just look in regedit on your own machine under HKLM\CCS\Control\Class

    -- pa

    • Marked as answer by Martin Kulov Monday, February 11, 2013 9:06 PM
    Monday, February 11, 2013 9:47 AM
  • I guess you are right, they are fixed values:

    http://technet.microsoft.com/en-us/subscriptions/index/ff545874(v=vs.85).aspx

    GUID_DEVINTERFACE_IMAGE

    Class GUID

    {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}

    Version

    Available in Windows XP and later versions of Windows.

    Header

    Wiaintfc.h (include Wiaintfc.h)

    Initially I read somewhere that they are different per installation but seems that the source is not trustworthy.

    Thank you!


    Martin Kulov
    www.kulov.net

    Microsoft Regional Director
    VS ALM MVP, MCT, MCSD, MCPD, INETA Speaker

    Monday, February 11, 2013 1:24 PM