Open up notepad and paste the following script:
Make sure you replace filename with the full path to the file. For example, a file called program.exe in a folder called “programs” on the thumb drive would be /programs/program.exe
Replace description with a short description of the program, for example, My Jukebox or Mozilla Firefox.
Save the file as autorun.inf, making sure you select “All Programs” from the save menu, not “Text document”!