Detecting USB drive insertion and removal using windows service and c#

Posted by Kb on Stack Overflow See other posts from Stack Overflow or by Kb
Published on 2009-03-06T19:40:51Z Indexed on 2010/06/07 10:12 UTC
Read the original article Hit count: 425

Filed under:
|
|
|
|

Looking into possibility of making an USB distributed application
that will autostart on insertion of an USB stick and shutdown when removing the stick

Will use .Net and C#.
Looking for suggestion how to approach this using C#?


Update: Two possible solutions implementing this as a service.
- override WndProc
or
- using WMI query with ManagementEventWatcher

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET