Run batch file when USB drive detected

2

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.

malvic

Posted 2011-06-06T10:46:30.650

Reputation:

Answers

1

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.

Jon

Posted 2011-06-06T10:46:30.650

Reputation: 203