Possible Duplicate:
How to detect a USB device has been plugged in?
I want to create c# .net windows application in which i want to show message when any USB device is connected to the local machine.
Also when this USB device is been connected i want to read a particular file in it.
My problem is that how should i determine the drive name of USB for reading file.
Eg.On particular machine if there are only two drives (c and d)...the usb drive detected over there wil be e. but on another machine if there are 3 drives then in that case USB drive can be f.
What shoud i do in that case for showing the message on connection of USB drive and reading the particular file in that drive.