How can I configure my PC to execute a batch file every time any USB drive is inserted? I would like to use regedit, if possible.

link|improve this question
feedback

migrated from stackoverflow.com Jun 6 '11 at 19:40

This question came from our site for professional and enthusiast programmers.

1 Answer

Since you mentioned batch file scripting, I'm going to assume a windows platform. You can write an application that handles these events: WM_DEVICECHANGE

I imagine you can have it running in the background as a daemon and have it call your batch file upon the right conditions.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown