privateDictionary<string,string>USBControllerDevice(){Dictionary<string,string> controllers =newDictionary<string,string>();//去除其他USB设备的影响ManagementObjectCollection USBControllerDeviceCollection =newManagementObjectSearcher("SELECT * FROM Win32_PnPEntity Where DeviceID like 'USBSTOR%'and ((DeviceID like '%NISEC&PROD_KEY%') or (DeviceID like '%AISINO&PROD_AIRY%'))").Get();if(USBControllerDeviceCollection !=null){foreach(var USBControllerDevice in USBControllerDeviceCollection){
controllers.Add(USBControllerDevice.GetPropertyValue("DeviceID").NullValue(), USBControllerDevice.GetPropertyValue("Caption").NullValue());}}return controllers;}