Reading USB ID
-
I am writing a C# application that detects USB drives as they are plugged in. I want to do different automated operations on the drive depending on which USB drive I plug in (ie if it is a new drive or one that has been previously plugged in). The easiest way to achieve this would be to read the hareware ID off the USB drive. Unfortuneately I do not no how to do this in C#. Does anyone have any ideas on how I could achieve this or if there is a C# class that returns this type of info? Regards SpaceMonkey
-
I am writing a C# application that detects USB drives as they are plugged in. I want to do different automated operations on the drive depending on which USB drive I plug in (ie if it is a new drive or one that has been previously plugged in). The easiest way to achieve this would be to read the hareware ID off the USB drive. Unfortuneately I do not no how to do this in C#. Does anyone have any ideas on how I could achieve this or if there is a C# class that returns this type of info? Regards SpaceMonkey
There is indeed a class that returns this type of info. A most excellent gentleman by the name of Dan helped me out with this a while back. He has made a very simple to use class for this very purpose. http://www.cfdan.com/posts/Retrieving_Non-Volatile_USB_Serial_Number_Using_C_Sharp.cfm