How to autorun programs from USB Flash Drive

Posted on August 28th, 2007 by Jason

How to autorun programs from USB Flash DriveLike we have autoplay feature on CDs, it’s possible to autorun programs and applications from your removable USB flash drive, provided you use it on Windows XP SP2.

Here’s a quick guide on how to autorun portable applications from your USB drive.

- 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

Here are some important notes on what the autorun.inf file contains:

open=Pstart.exe
The open option specifies the program that should autorun. You must use relative paths here. Do not specify the drive letter since it may vary from PC to PC.

action=Run PStart Program
This describes the action that will be performed. This parameter is used by Windows Explorer in the autoplay dialog.

icon=PStart.exe
Specifies the icon to be used for the USB drive. The icon can be fetched from an .EXE file or it can be in the normal .ICO format. (more on changing icons here)

label=My Portable PC
The label parameter can be used to specify the name of the drive.

Tags: , , , , , , , , , , , , , ,

Related posts

7 Responses to “How to autorun programs from USB Flash Drive”

  1. MS Windows Vista Compatible Software on 28 Aug 2007 at 2:51 pm #

    Like we have autoplay feature on CDs, it’s possible to autorun programs and applications from your removable USB flash drive, provided you use it on Windows XP SP2. Here’s a quick guide on how to autorun portable applications from your USB drive.(more…)autoplay feature, autorun inf, computer, exe file, Hardware, inf file, portable pc, program icon, pstart, removable drive, usb drive, usb flash drive, Windows, windows explorer, windows xp sp2

  2. Slashdot - Firehose on 28 Aug 2007 at 3:55 pm #

    [...] How to autorun programs from USB Flash Drive[->] 2007-08-28 16:53 Bookmark by pcripsbox on Tuesday August 28, @04:53PM [...]

  3. autoplay usb flash drive XP: Web Search Results from Answers.com on 27 Sep 2007 at 3:26 pm #

    [...] possibilities. …search.techrepublic.com.com/search/ Microsoft+Windows+XP+and+USB+Flash+Drive.htmlHow to autorun programs from USB Flash Drive | PCTips BoxHow to autorun programs from USB Flash Drive Like we have autoplay feature … from your removable [...]

  4. Max on 23 Dec 2007 at 3:33 pm #

    Tried this in my autorun file to launch the Pstart exe, but it didn’t work.

    I have Xp SP2. It did change the label of the drive to “portable drive”, but no autorun.

    Help!

  5. corps on 05 Feb 2008 at 3:01 pm #

    It doesn’t work as windows doesn’t support Autorun from USB. It will Autoplay meaning it will popup a box to choose what to do and the program you specify in the Autorin.inf will be displayed but it won’t autoplay.

    Some XP workstations do seem to do it but most don’t. Like my old win98se machine could hot swap USB devices but it wasn’t supposed to be able to.

    Vista can autorun directly from USB. U3 drives have firmware to trick PC that a partition is a CD to get the autorun to work.

    Check the forums on portableapps.com

  6. Farhan on 07 Aug 2008 at 9:43 am #

    is it possible to get autorun.inf to start to programs at once

  7. Jim on 26 May 2009 at 5:54 am #

    yes it is possible to have a program autorun with autorun.inf. Here is an example of an autorun.inf that will open a .bat command once u plug in the USB
    [autorun]
    open=test.bat
    shell\open\test.bat
    useautoplay=1

Leave a Reply