UsbAutorun is an application that enables autostarting of applications upon insertion of USB memory cards in Windows. Autostarting of applications when inserting new media is generally used for CDs and triggered by a file called autorun.inf in the root of the disk. This function is not supported for USB memories in the base OS although Windows XP sp2 introduced some support for it.

This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.


To install this application:

  1. Extract the application (UsbAutorun.exe) to your disk.
    Open a command promt window and change directory to where the application was extracted
  2. Type usbautorun /install
  3. Type usbautorun /password {password} (with a password of sufficiently high entropy)
  4. Type usbautorun


As long as the application is running it will react on device insertions and use the autorun.inf file in the root of the USB memory to start any application indicated in the file. The autorun.inf file needs to have a new segment named UsbAutoRun which gives details on what to do when the USB memory is inserted. It also provides a password which must match the password configured in the computer itself. If the passwords don't match, the application will silently disregard the insertion of the USB memory. Below is an example of an autorun.inf file.



Running usbautorun /install writes data to the registry at HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Run to make the application autostart when the current user is logged on. After it is installed the application must not be moved as the path is written to the registry. For more information on command line parameters, type usbautorun -? at the command promt.

Note: Is is highly recommended to use a password as the ability to run an application on the computer just by inserting a USB memory card otherwise may be misused as a way to spread viruses.