Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello friends.

In my application i want to wright the code which is detect the pen drive when it is inserted, and run the exe which is in pen drive. how to use background worker for this task.

please reply me soon



thanks.....
Posted

1 solution

Did you try googling?

I just googled and came up with this nice CP article to detect pen drive insertion /removel.

Detecting USB Drive Removal in a C# Program[^]


This could be a starting point for your project and once detected, try and read the drive name and once you know the drive name....you know the path to your *.EXE for the execution ?
 
Share this answer
 
Comments
bburhanbohra 14-Oct-11 7:02am    
thanx
Bala Selvanayagam 14-Oct-11 7:24am    
If you are happy, upvote the answer and accept it
RaviRanjanKr 26-Dec-11 17:27pm    
5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900