4

I used this code for finding graphic cards:

ManagementObjectSearcher searcher = 
               new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration");

string graphicsCard = "";
foreach (ManagementObject mo in searcher.Get())
{
   foreach (PropertyData property in mo.Properties)
   {
      if (property.Name == "Description")
      {
        graphicsCard += property.Value.ToString();
      }
   }
}

My Graphic Cards

but result is: Nvidia Quadro K6000

How to find all Graphic cards?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Mohammad
  • 528
  • 4
  • 21

1 Answers1

8

The very first line of the MSDN page reads:

[The Win32_DisplayConfiguration WMI class is no longer available for use as of Windows Server 2008. Instead, use the properties in the Win32_VideoController, Win32_DesktopMonitor, and CIM_VideoControllerResolution classes.]

So I suggest you start out with Win32_VideoController.

nvoigt
  • 75,013
  • 26
  • 93
  • 142