I use this code for get all drive in pc:
using System;
using System.IO;
class Info {
public static void Main() {
DriveInfo[] drives = DriveInfo.GetDrives();
foreach (DriveInfo drive in drives) {
Console.WriteLine(drive.Name);
}
}
}
Now, using the name of each drive, I want to find its PNPDeviceID.