Disc Wizards

How to create an autorun CD

Instructions on how to create an autorun for your CD or DVD master

When a CD is inserted into a PC computer, Windows presents the user with several options on how the disc can be opened. This can include ‘exploring’ the disc contents or playing the disc in WMP (Windows Media Player).

A more user-friendly approach to handling data discs in Windows is to author the disc so that it automatically runs the desired software, or launches a specific file in a designated program. An example of this would be a PDF file into Adobe Reader.

By creating a CD with this functionality it saves the user time and effort from exploring the contents of the disc, in order to find the correct files to run.

A disc with this type of functionality is known as an autorun CD. It’s fairly straightforward to implement using existing tools within the Windows or MAC environment, and looks very professional for the final user.

An autorun CD is also useful when the end user is not very computer savvy and may need help navigating to the right parts of the disc.

'Open' autorun vs 'shellexecute' autorun

There are two main types of autorun file that we can create. One is known as the ‘open’ autorun, the other being the ‘shellexecute’ autorun.

The ‘open’ autorun is used when a specific executable file needs to be run from the CD. An executable file can be identified from the .exe extension at the end of the file name.

The ‘shellexecute’ autorun is used when we need to open a specific file in its native software that is already pre-installed on the computer.

For example, if we want the user’s computer to open a particular software on the CD, then we use the ‘open’ method, and if we want to open say a PDF file from the CD, then we’d use the ‘shellexecute’ method by using the script to launch Adobe Reader, and then open the PDF file in Adobe Reader.

To create the autorun file, we will use Notepad, which is pre-installed on all Windows machines.

Fig 1: Above image shows the ‘open’ method for an autorun.inf file, which is used to launch exe files. It has been created using Notepad.

Create an autorun with the ‘open’ command

  1. The first thing to do is fire up Notepad.
  2. Then we type ‘[autorun]’ on the first line.
  3. On the second line we type, ‘open=filename.exe’ (where file name is replaced with the name of the software).
  4. We then save the file using the name, ‘autorun.inf’.

Create an autorun with the ‘shellexecute’ command

  1. Open Notepad, and as above, the first line contains, ‘[autorun]’.
  2. Then the second line contains, ‘shellexecute=filename.extension’, where ‘filename’ is the name of the file, and ‘.extension’ is the extension of the file. Using the above example of a pdf file, the file could be discwizards.pdf.
  3. As in the ‘open’ method, we save the file as ‘autorun.inf’.
Fig 2: Again we see an autorun.inf file, this time using the ‘shellexecute’ method to launch a non-executable file, such as a pdf.

Important information about the above instructions:

Do not type the apostrophes, only the content within them.

If your filenames have spaces in the naming convention, then for the purposes of the autorun, (which cannot recognise files names with spaces), either remove the spaces or replace the spaces with underscores in the original files.

The autorun file will reside on the root of the disc. If you need the auto run to launch a file which is stored deeper within another folder, then we can reference this file, by using the folder name before the filename, therefore, nameoffolder/filename.extension.

A point to remember is those users who are extra security conscious may have disabled the ability for CDs to launch without any user input, and therefore the autorun.inf file will not work in this case. However, they are likely to be experienced users, who would be comfortable with navigating the disc contents themselves, and are likely to find the correct content of the disc.

It’s also worth putting instructions on the CD packaging or the print on the disc, informing users that an autorun is present, and also provide instructions on how to operate the disc, in case the autorun does not launch.

Include a customised icon and label for your autorun CDs

If you have managed to follow the above instructions without a hitch, then an added functionality we can encode into the autorun is to display a custom icon in Windows Explorer for your CD, and a custom volume/label name rather than the default windows naming convention. The icon can be a company logo, or other graphics related to the contents of the disc, and the volume name a text title describing the disc content.

To include the customised icon, first create a 30 pixel by 30 pixel icon. This can be done in MS Paint, or if you have paid software such as Photoshop, than this can be used too. Save this file with a .ico extension. Then, in the autorun.inf file, we add the following line to the bottom: ‘icon=filename.ico’.

To create the custom volume/label name, in the autorun.inf file we add ‘label=MyCDName’, where MyCDName is replaced with a descriptive name for the content of the disc. Remember to put both these commands on their own new lines, and do not include the apostrophes.

Finally ,we ensure the autorun.inf file is placed in the root or top-most folder of the CD contents, and be sure to include this file when creating the master CD.

As a final note, check the disc works as intended by testing it in various computers, before sending it across to Disc Wizards, or any other CD duplication manufacturer for mass pressing.

Note for Mac and OSX users

Autorun discs are not easy to create in OSX. Apple has disabled any direct autorun facility within the OSX environment, therefore it is next to impossible to implement unless we use heavy-handed hacks, (not recommended).

An alternative is to create a custom Finder window design that makes it clear to the user on how to use the disc. There are several paid applications that can create this, as well as using the in-built disc utilities within the OSX environment.

If you have any questions about CD authoring or autorun enquiries, you can email or call us on the above telephone numbers. We’ll be happy to assist you with your enquiry and answer any questions you have.

Scroll to Top

Ask us a question

Thanks!
Your message as been received
We'll be in touch soon!