forum

home / developersection / forums / get list of usb in winform using c#?

Get list of USB in winform using c#?

Aaron Douglas 4321 16-Oct-2013

I have tried the below line of code to get the USB devices from the computer.

 foreach (DriveInfo driveInfo in DriveInfo.GetDrives())

 {
     if (driveInfo.DriveType == DriveType.Removable)
     {
        comboBoxUSB.Items.Add(driveInfo.Name);
     }
 }
comboBoxUSB is a combobox.. here i am getting this :

 E:/
 G:/

but not getting the device name, like :

 E:/Mindstick 

something like this, how can i get this? is it possible to get this?

please help!


c# c# 
Updated on 16-Oct-2013
Can you answer this question?

Answer

1 Answers

Liked By