5

This is my code, I can get name, description...

ManagementClass MgmtClass = new ManagementClass("Win32_SystemDriver");

foreach (ManagementObject mo in MgmtClass.GetInstances())
{
  name=mo["Name"];
  Dis=mo["Description"];
  ...
}

How can I get the date and version of drivers?

Peter Lang
  • 54,264
  • 27
  • 148
  • 161
sari
  • 173
  • 4
  • 12
  • If an answer gives you the info you were looking for then you should mark it as the answer. – Bill W Aug 09 '10 at 15:37

1 Answers1

0

You should start from researching Win32_PnPSignedDriver Class and Win32_PnPEntity Class

EXAMPLE

ManagementObjectSearcher searcher =
                    new ManagementObjectSearcher("root\\CIMV2",
                    "SELECT * FROM Win32_PnPSignedDriver");
                    ManagementObjectCollection moc = searcher.Get();

                    foreach (var manObj in moc)
                    {
                        Console.WriteLine("Device Name: {0}\r\nDeviceID: {1}\r\nDriverDate: {2}\r\nDriverVersion: {3}\r\n==============================\r\n", manObj["FriendlyName"], manObj["DeviceID"], manObj["DriverDate"], manObj["DriverVersion"]);
                    }
Eugene Cheverda
  • 8,760
  • 2
  • 33
  • 18