Win32_DiskDrive和eSATA

我试图检测使用WMI的可移动驱动器,目前我正在通过InterfaceType进行过滤,以仅包含具有USB接口的驱动器。 我想知道是否有办法检测eSATA驱动器,换句话说, Win32_DiskDrive类给eSATA驱动器的接口types是什么。

目前我没有eSATA驱动器,所以我不确定接口types应该是什么,因为根据MSDN ,eSATA或SATA没有被列为InterfaceType成员的有效值。

目前列出的值是:

 SCSI HDC IDE USB 1394 

所以我想知道有人可以帮我吗?

问候

最有可能的是它会来'USB'或可以使用下面的代码找到一个:

 Dim Mq As New Management.ObjectQuery("WQL", "Select Caption,DeviceID,InterfaceType from Win32_DiskDrive ") ' you can include where InterfaceType='USB' Dim scop As New ManagementScope("root\cimv2") Dim MobSrchr As New ManagementObjectSearcher(scop, Mq) Dim Disks As New List(Of String) For Each mob As ManagementObject In MobSrchr.Get Dim DrivInfo As String = Nothing DrivInfo = "Caption : " + mob.Properties("Caption").Value + Environment.NewLine DrivInfo += "Device ID : " + mob.Properties("DeviceID").Value + Environment.NewLine DrivInfo += "InterfaceType : " + mob.Properties("InterfaceType").Value + Environment.NewLine Disks.Add(DrivInfo) Next