none
Get driver file information for NIC RRS feed

  • Question

  • I am trying to get the information related to Network card driver file using C#

    does anyone have idea about how to get the driver file list of all network adapters.

    Wednesday, April 3, 2013 9:40 AM

Answers

  • In many cases the information available from these types of property windows rely on APIs that are either undocumented or unsupported so sometimes it just isn't possible to get all the same information.

    For this specific case I believe you can get everything from WMI.  You can find the adapter in question using Win32_NetworkAdapter.  From that you get the DeviceID and PNPDeviceId.  Given the PNPDeviceId you can find the driver (which is the info show at the top of the main properties window) from Win32_PnPSignedDriver.  You can get the .sys file from there but I don't know where to get the other files.

    Alternatively you could use the service name from WMI to look up the entry in the registry.  That will give you the filepath to the .sys file.  But from there I don't know how to find the other DLLs.  It might just view the binary dependencies to get the other DLLs.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Wednesday, April 3, 2013 2:46 PM
    Moderator

All replies

  • In many cases the information available from these types of property windows rely on APIs that are either undocumented or unsupported so sometimes it just isn't possible to get all the same information.

    For this specific case I believe you can get everything from WMI.  You can find the adapter in question using Win32_NetworkAdapter.  From that you get the DeviceID and PNPDeviceId.  Given the PNPDeviceId you can find the driver (which is the info show at the top of the main properties window) from Win32_PnPSignedDriver.  You can get the .sys file from there but I don't know where to get the other files.

    Alternatively you could use the service name from WMI to look up the entry in the registry.  That will give you the filepath to the .sys file.  But from there I don't know how to find the other DLLs.  It might just view the binary dependencies to get the other DLLs.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Wednesday, April 3, 2013 2:46 PM
    Moderator
  • I was able to find the particular .sys file, but was not able to get other .dll file list.

    I used Win32_PnPSignedDriver,  Win32_NetworkAdapter to get .sys info.

    Friday, April 5, 2013 4:31 AM
  • Take a look at Win32_PnPSignedDriverCIMDataFile.  Given the PnPSignedDriver value you can get the associated CIMDataFile entries.  I'm not sure if this only references the driver file itself or all files. 

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Friday, April 5, 2013 6:39 PM
    Moderator