Remove autorun.inf from pendrive automatically
I've made a simple application to automatically remove autorun.inf
from pendrive.
Your question isn’t to clear. I assume you mean you want your application to run every time a USB drive is inserted? You should be able to do it using a managementeventwatcher.
http://msdn.microsoft.com/en-us/library/system.management.managementeventwatcher.aspx
This component runs a query you provide on your computers WMI instance. WMI will detect your USB drive and then your watcher will raise the event.
精彩评论