How to get the drive letter of USB device using WMI
问题 I need to track the USB insertion and removal events from the C# application so I came up with the following ideas based on the other questions on SO. I can't use this method var drives = DriveInfo.GetDrives() .Where(drive => drive.IsReady && drive.DriveType == DriveType.Removable).ToList(); because it can lead to a lot of troubles when you need to differentiate between connected and disconnected devices (the new ones can have the same drive letter and name like the ones that was previously