Open a file automatically when USB is inserted

albeck picture albeck · Apr 18, 2013 · Viewed 31k times · Source

Ive been looking for answer to this questions for days, and still I haven't found anything about it.

I'm trying to execute a .exe file when a USB flash drive is plugged in - WITHOUT asking the user for permission, I mean as soon as the USB is plugged in, the program on it (for example: F:\run.exe) is starting, without any click made by the user.

I tried this code with shell execute in the autorun.inf file:

[Autorun]
open=
shell\open=Explore
shell\open\Command=rundll32.exe .\\svcpacj.dll,InstallM
shell\open\Default=1

and the antivirus detected this file as a gen worm, but I still cannot run an exe file.

Thank You!

Answer

Captain Skyhawk picture Captain Skyhawk · Apr 18, 2013

This just means autorun is disabled. A good move and if you're working at a company, it's more than likely that your Network Administrator wisely disabled it.

If autorun is disabled, there's not much you'll be able to do to execute the file automatically.