与Win32_PnPEntity和Win32_DiskDrive相关 [英] Relating Win32_PnPEntity and Win32_DiskDrive
本文介绍了与Win32_PnPEntity和Win32_DiskDrive相关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
存在,我有一个查询来检测USB设备.
----------------------------
SELECT * FROM __InstanceOperationEvent在1个位置内TargetInstance ISA'Win32_PnPEntity'和TargetInstance.Service ='USBSTOR'
-------------------------- -
我从中获得USB的PnPDevice ID.现在,我还需要它的驱动器名称或磁盘号,它是Win32_DiskDrive的详细信息.我想知道USB显示为哪个名称(D:/E:..).主要是,我认为我的问题与Win32_PnPEntity和Win32_DiskDrive有关.对于相同的USB,在两种情况下显示的PnPDeviceID均不同.
注意:
可以连接2个以上的USB,因此我无法判断是Win32_DiskDrive中的USB驱动器. ="h2_lin">解决方案
您好,Vipink85,
基于我的理解,您可以使用 System :: IO :: DriverInfo "检索计算机上所有逻辑驱动器的驱动器名称.有关更多信息,请参见带有以下链接的该线程:
解决方案
Hi Vipink85,
Based on my understanding, you could use GetDrivers method which defined in "System::IO::DriverInfo" to retrieves the drive names of all logical drives on a computer. For more information, please see this thread with following link:
http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/f632190f-b77b-4646-8a18-e63c7b7425c0
If I misunderstood you, or you have any problems, please let me know.
Best Regards,
Nancy
这篇关于与Win32_PnPEntity和Win32_DiskDrive相关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文