I’ve made a simple application to automatically remove autorun.inf from pendrive.
My algo is very simple, at an interval the app runs how many drive is there if it gets a Removable disk it tries to delete autorun.inf file.
But i want to optimize it by removing the timer.
How to do it ?
I’ve made a simple application to automatically remove autorun.inf from pendrive. My algo is
Share
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.