If you mine an autorun like the one in a CD or DVD, you have to create an autorun.ini file in the pen drive wich contains the following lines :
[AutoRun]
ACTION= Run ProgramName
OPEN=MyProgram.exe
ICON=SomeIcon.ico
Note that this do not run the application automatically, it add an option to run it by comfirming
----
if you mine make it like a CD to start an xp installation for ex, you need to copy the files to the pen drive then modify your boot sequence ( PRESS DEL or F2 Key to enter setup while computer startup) to USB-HDD as the first materiel to detect an OS. Be careful if you do not know how to use setup then do not try,