开发者

how can I get driver's version of Network Adapter ? by c# code?

h开发者_StackOverflow中文版ow can I get driver's version of Network Adapter ? by c# code?


You should be able to do it via WMI. The Win32_PnPSignedDriver class looks like a good place to start, especially the DriverVersion property.

I think something like this might work (please note, this code is completely untested and is just an educated guess on how it might work):

using System.Management;

...


ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PnPSignedDriver");
foreach(ManagementObject obj in searcher.Get())
{
    // loop until you find the driver you're looking for (Hopefully you can distinguish this by the DeviceName, DriverName or FriendlyName)
    string version = obj.GetPropertyValue("DriverVersion").ToString();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜