I am trying to auto run an application after I've plugged in my USB pen drive. Is there any way to automatically open myappilication.exe from my USB root file, instead of showing the option an list of which applications I'd like to run.
Asked
Active
Viewed 5.8k times
1 Answers
15
Just copy paste from a site that tells how to write an autorun..
Open Notepad
Type in:
[autorun]
open=PStart.exe
action=Run PStart Program
icon=PStart.exe
label=My Portable PC
Save the file as autorun.inf
Put the file in the root of your USB flash drive
The next time you insert your removable drive into your PC, the specified program will autorun from the USB drive
ref: http://blog.shankarganesh.com/2007/08/11/how-to-autorun-programs-from-usb-flash-drive/
my comment about this topic..
as i know there is a flag in registry that enables/disables autorun on flash.
it also enables/disables autorun of other devices
maybe you can search for it..

ufukgun
- 6,889
- 8
- 33
- 55
-
can u tell me pls this is the executable file PStart.exe.which will automatically run while plug in USB ? – Aug 05 '09 at 13:08
-
yes i tried now but its asking for run that executable file i.e PStart.exe.But is it possible directly that PStart.exe will run while plug in USB drive. – Aug 05 '09 at 13:12
-
for security reasons, Windows Vista/7 will prompt for action before auto-playing an executable. I can't remember because it's been so long since I've used windows, but I think a user can choose "Automatically do selected action from now on" or something to that extent. – Joel Dec 28 '11 at 01:22