home Pricing & Packaging FAQ Help Center Upload Center Other Services

How to Make an AutoStart CD ROM

This page discusses the basics in creating your own AutoStart CD for Windows XP. For more detailed information on this topic including autostart for MACs, please visit our CD Autostart Advantages page.

Also known as CD auto-start, CD auto-run, CD auto-play

Including an autostart on your CD ROM can be useful for a whole variety of reasons. It can help identify specific content on a CD that should be viewed fist, or detect and install software that's required to properly run certain files.

The concept on how to create a basic auto-start CD is quite simple: When a CD is inserted into the end user's CD ROM drive, we want the computer to find specific text file (.ini) that gives special instructions as to what to do with the contents of the CD. In this case the text file will be named "autorun.inf", and will instruct Windows to find and execute a designated file...

Depending on the file you wish to autostart, there are mainly two methods in which we can use:

  • 'Open' Command (for self-executable files; .exe)
  • 'ShellExecute' Command (for other file-types; .jpg, .mpg, .pdf, etc.)

Creating an AutoStart for a Program / Self-Executable File (.exe)

Burning a CD so that a program or a self-executable file (.exe) can launch automatically on Windows XP involves only a few minor steps:

  1. Open Notepad to create autorun.inf (In Windows XP, click "Start > Programs > All Programs > Accessories > Notepad").

  2. Copy-paste the following code into Notepad:

    [autorun]
    Open = myfile.exe


    Change "myfile.exe" to the name of the program file that you would like to self-launch. Make sure these are exactly the same or else the autostart will not work.

    autostart cd rom

  3. Save this text file as "autorun.ini" in the same location as the self-executable file (myfile.exe) with "ANSI" selected as the encoding type.

    autostart

  4. Using your favorite CD burning program, copy "autorun.inf" and "myfile.exe" on to a CDR along with any other important files/folders.

NOTE: Using the above code, the .inf and the .exe files must be in the same directory for Windows to know which file to autostart. If you prefer your project files to be in a separate folder, you can enter a different location in autorun.inf by changing "Open = myfile.exe" to specify a path: "Open = foldername/myfile.exe" ("autorun.inf" MUST ALWAYS be on the top level for the autostart to work).

AutoStart files other than .EXE's

The process of autostarting files other than self-executables involves a slightly different approach. We will be making use of a newer feature called "ShellExecute".

Introduced in Microsoft Windows 2000, ShellExecute is a much more flexible function which can be applied to almost any file type on a PC. Where "Open = myfile.exe" would usually fail, this command is excellent for autostarting PDFs, Word documents, HTML pages and videos using their native programs.

Be aware that ShellExecute will only work on newer versions of Microsoft Windows (Windows 2000, Windows Me, Windows XP, Windows Server 2003 and later).

Applying ShellExecute

The steps to auto-starting files using ShellExecute are almost identical to those of the "Open" command:

  1. Copy-paste the following code inside a fresh Notepad document:

    [autorun]
    shellexecute=myfile.html


    Change "myfile.html" to the name of the file that you would like to self-launch. Whether the file is an HTML document, PDF or movie, the file name and extension must match exactly for shellexecute to work.

    CD ROM

  2. Save this text file as "autorun.ini" in the same location as the file you specified above selecting "ANSI" as the encoding type.

  3. Copy your files including "autorun.inf" on to a CDR using a CD writing application.

    auto start cdrom

IMPORTANT: Even though ShellExecute is an excellent tool for auto starting all sorts of files- be cautious- not all PC's have the same software loaded. All because you may be able to open or view a certain file, others may not have so much luck. The last thing you want is the end user to become frustrated or confused when Windows gives an error message because it doesn't recognize the file that's attempting to autostart.

The best way to avoid this complication is to choose only common file-types to autostart; virtually every PC in the world is equipped with the necessary software to open certain 'universal' formats.

The following are guaranteed to work on any PC running Microsoft Windows XP...

  • Graphics: .jpg; .jpeg; .gif; .bmp; .tif; .tiff; .png
  • Web/Text Documents: .html; .htm; .txt
  • Video: .mpg; .mpeg; .avi; .wmv
  • Audio: .wav; .mp3; .wma
  • Compressed and Encoded: .zip

There are other formats, while not being 100% compatible with all PC's, that most computers will likely be able to access. These usually include widely distributed software and free web applications. Great examples include Adobe Acrobat Reader (.pdf), Microsoft Word (.doc) and Macromedia Flash movies (.swf). If not already installed, users can probably download these programs free of charge.

Just Say "No"

Windows users have an option to disable AutoRun on their computers. Meaning that even though your CD has an autorun command included, the designated file will not be launched automatically. Reasons for doing so usually involve security/virus precautions.

As another safety net, PC's running Windows NT4, 2000 and XP only allow Administrators and Power Users to make use of the AutoRun feature. As practical resolution, and to escape too much complication, you should always include detailed instructions on how to properly access the contents of your CD ROM. This is also good practice for those viewing your CD on a Macintosh computer.