Autorun.inf Editor Index

Autorun.inf Editor Information

Overview
Step-By-Step Instructions
Relative vs. Absolute Paths


Autorun.inf Editor Instructions

Autorun.inf File Editor

The Autorun.inf Editor is a program that can be used to quickly and easily create autorun.inf files. An autorun.inf file is a required file when creating an autorun CD. When a CD is put into the drive, the operating system looks for the autorun.inf file. If the file exists, it reads the file and then knows how to "autoplay" the CD. There are a number of things you can do with an autorun.inf file. For more information on autorun.inf files click here.

The Autoru.inf Editor was created as a free utility to make it easy for people to generate their own autorun.inf files. With the editor you can create an autorun.inf file that can:

  • Set a label for the CD (this label will be displayed in My Computer and Explorer on a Windows computer)
  • Set an icon for the CD
  • Specify a program on the CD (or user's computer) to run when the CD is inserted
  • Add entries and commands to the context menu for when a user right-clicks on the CD

Screenshot of the program

Step-by-step instructions on creating an autorun.inf file using the editor


Autorun.inf Editor Instructions

Autorun.inf File Editor Step-by-Step Instructions

Steps:

  1. Specify program to run

  2. Set a label

  3. Select icon

  4. Set context menu items and commands

  5. Preview the file

  6. Save the file

Step 1: Program

The first step is to select the program you want to have start automatically when the CD is put into the drive. This program will need to be located somewhere on the CD. When you select the program the Autorun.inf Editor will put only the filename into the box (it will not include any path information). This will be fine if you plan to have the program in the "root" of the CD (i.e. you will not have the file in a subfolder).

If you plan to have the file in a subfolder on the CD then you need to add the path information yourself to the text box.

Note: When specifying folders on the CD you need make sure it is a relative path, not an absolute path. To make it a path relative to the CD put a".\" in the front (as in the screen shot). For more information on relative vs. absolute paths click here.

If instead of running a program you would like to automatically open a document or web page when the CD is inserted, you can use a small helper program that is packaged with the Autorun.inf Editor. The helper program is called "opener.exe". By using the program you can easily open html files (or web sites) or other documents that the autorun.inf "open" command cannot handle. To use the program, add "opener.exe" to the program line followed by the document or site you want to open.

In the screenshot above I am using opener.exe to open the Moon Valley website.

Note: When you are ready to burn the CD, make sure you put the opener.exe file onto the CD. Also be sure to specify the correct relative path for the opener.exe file (where its located on the CD) and for the document you want to open (relative to the opener.exe file). For example, if I wanted to open an excel spreadsheet that I had in a subfolder on my CD, I would type "opener.exe .\MyDocuments\MyFinances.xls" However, if I also placed the opener.exe file in the "MyDocuments" subfolder then I would add the line ".\MyDocuments\opener.exe MyFinances.xls" The path for the opener.exe file is relative to the CD, and the path for the document is relative to the opener.exe file.

{back to top}

Step 2: Label

Now that the program has been selected we can add a label for our CD. This is a text label which will be seen in My Computer and Explorer (in Windows).

Note: labels do not function correctly on Windows XP systems. The label does not show up and neither will the icon. If you expect your CD to be used on Windows XP computers you may not want to specify a label.

{back to top}

Step 3:Icon

Next specify an icon. This icon will be used to represent the CD drive. If the icon you want to select is part of an exe or dll file, first select the file. Then in the pull down window select the index number for the specific icon you want.

In this screenshot I selected the Microsoft Word executable file and picked the 4th icon.

Remember, the icon file you specify must be located on the CD when the CD is burned. For more information about specifying the location of the file on the CD, see the section above which talks about specifying the program file.

{back to top}

Step 4: Context Menu Items

Lastly, you can specify up to two context menu items. The context menu is when you right click on the CD and the little menu pops up. You can add entries to this menu, such as Install or Readme or whatever you want. First specify what you want to appear on the menu, then specify the action that will happen when the user selects it. For example, if you want to add an "Install" item which will run an installation executable called "setup.exe" you would enter:

When someone right clicks on the CD the context menu will appear with the new entry:

{back to top}

Step 5: Autorun.inf Preview

Once you have specified everything you want to include, you can click on the preview button to preview the contents of your autorun.inf file.

{back to top}

Step 6: Save

When you have finished, click the save button to save your autorun.inf file. This file will also need to be burned onto the CD. (Note: this file cannot be located in a subfolder)

{back to top}


Relative vs. Absolute Paths

File and folder locations are important to Autorun projects. Those file and folder locations often vary from the development environment to the CD being created. Additionally, the folder structure of both the development environment and the CD will likely vary from the machine on which the program will be run. Not considering relative and absolute paths can have an adverse impact.

An absolute path is the most commonly seen and used type; it explicitly states the drive, the folder (or folders) and conditionally a filename.

Examples:

C:\my documents\myfile.txt

C:\windows\temporary internet files\mygrahic.gif

A relative path is an implied path. When a command is expressed that references folders or files (or folders and a file) the current, working drive and directory is the implied path. Therefore, a relative path is stated in relation to the current, working drive.

Ex.1 | mygraphic.gif | This .gif file is in the current directory. | The current directory is designated by: (name), (.\name), or (name\).
 | .\mygraphic.gif | (This means the same thing as the one above.) |
 | mygraphic.gif\ | (This would be another way of saying the same thing.) |
Ex.2 | ..\mygraphic.gif | This .gif file is back one directory from the current directory. | To move back a directory another period or the name of the directory must be added before the current directory’s name: (..\name) or (new\name).
Ex.3 | \windows\mydocuments\mygraphic.gif | This is a little tricky- to access the file, we have to back up to the Root directory and then follow the path. | Paths starting with a backslash (\) mean that the Root directory must be accessed first to follow the path.