Detect SD card using WMI Query

2019-09-17 04:35发布

问题:

I have a query that return USB devices attached in:

   SelectQuery sq = new SelectQuery("select DeviceID, Model from Win32_DiskDrive where   InterfaceType='USB'");
   ManagementObjectCollection MOC = new ManagementObjectSearcher(sq).Get();

But it doesn't retrieve the SD card information.

How do i can retrieve this SD cards information using WMI queries?

回答1:

i modified "select DeviceID, Model from Win32_DiskDrive where InterfaceType='USB'" removing "where InterfaceType='USB"