从设备管理器中找到驱动程序列表 [英] Find out list of Drivers from the Device Manager
本文介绍了从设备管理器中找到驱动程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
我正在使用以下代码来查找驱动程序列表.该代码仅在管理员模式下有效,而在用户模式下无效.对于此代码,我引用的是系统dll"System.managment.dll".我也想在用户模式"下找到阅读器列表.
Hi!
I am using the following code to find out the list of drivers. This code is working only in the Administrator Mode not in the User Mode. For this code I am referencing the System dll "System.managment.dll".I want to find the list of readers in the User Mode also.
try
{
// string s = "";
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_PnPEntity");
foreach (ManagementObject queryObj in searcher.Get())
{
string s = "";
s = queryObj["Caption"].ToString();
}
}
catch (ManagementException e1)
{
}
谢谢
推荐答案
^ ]
简单设备管理器 [
http://blogs.msdn.com/b/dimeby8/archive/2006/12/05/enumerating-wpd-devices-in-c.aspx[^]
Simple Device Manager[^]
这篇关于从设备管理器中找到驱动程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文