USBBen sent me an e-mail asking me about automatically running a program when a USB drive is inserted into a computer. Ben writes:

Hi

I really like your site. Now I finally can have fun with my USB and not just use it at work.

I was wondering if there’s any way to make the USB drive run an exe as soon as its placed in the drive? Without questions asked.

The thing is, I would like my USB to send me an e-mail as soon as someone plugged it in, with something like.

“USB used at [IP] at [TIME], computer name is [COMPUTERNAME]”

so if someone stole it and tried to use it, I would know who they are (or the police at least know)

Is that possible?

- Ben.

Well, Ben, the short answer to your question is “Not that I am aware of.” Microsoft has put the AutoPlay function to prevent people from putting viruses on USB drives and infecting people’s computers this way.

Now, if you install a small monitoring client on a computer, it could monitor the system for USB drives and if it finds the USB drive and the appropriate application, it could launch it without prompting but this would defeat the purpose of having the application run from a found USB drive.

But, let me extend this question out to the DCoT readership. Does anyone out there know how to perform this action? If so, let us know in the comments.

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?