本文介绍了与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">解决方案


Presenlty, I have a query to detect USB device.
----------------------------
SELECT * FROM __InstanceOperationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_PnPEntity' and TargetInstance.Service='USBSTOR'
----------------------------

I get USB's PnPDevice ID from it. Now I also want its drive name or disk number which is a Win32_DiskDrive detail. I wanted to know the USB is displayed as which name(D:/E:..). Mainly, I think my problem is relating Win32_PnPEntity and Win32_DiskDrive. The PnPDeviceID displayed in both the cases are different for same USB.

Note:
There can be more than 2 USB's attached so I cannot juct check which is USB drive from Win32_DiskDrive.

解决方案


这篇关于与Win32_PnPEntity和Win32_DiskDrive相关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 01:02