Creating Autorun.inf files

This guide will teach you how to create an Autorun.inf file and use it with Pendrive Autorun.

First, create a new textdocument by right clicking on your desktop and choose New, Textdocument. Rename* the textdocument to "Autorun.inf" without the quotes by rightclicking on it and choose rename. Then doubleclick the file, by default notepad should start with an empty document. Enter the following:


[Autorun]
open=your.exe

After this, change the "your.exe" to the file you want to start. This file can have any extension, as long as it is associated with a program that can execute it. Mostly these are files which have their own icon instead of the default windows icon. Save the file and copy it to your USB volume, DO NOT place it in a subdirectory because Pendrive Autorun will only react on Autorun.inf files which are placed in the Root of the Volume. Then copy the file you specified after the OPEN command to the same place as the Autorun.inf file. Now unplug the USB volume and make sure Pendrive Autorun is started and activated. When you plug it back in, the file you specified should start immediately, depending the speed of the computer.


As of Pendrive Autorun version 2, running multiple files is now supported. This is shown in the following example:


[autorun]
showmessage=this is a message
open=c:\
open2=your.exe
open3=image.png

When the USB volume is connected with this Autorun.inf in the root it will first give you a message with the text specified in "showmessage", when the OK button is pressed the other commands are executed in order starting at "open" with a maximum of 5 files, so "open5" being the last one. Showing a message always has priority over the other commands, no matter where you place it in the file.



*Make sure that the "Hide extensions for known file types" is not checked. You can find this option in the Configuration screen, Folder Options, View.