Free Autorun.exe for CD


Autorun Image

Most Windows users are familiar with the CD auto-play feature. Software shipped on CD makes use of this to start the installation program automatically. But what if you don't want to start an executable? Perhaps you want to display a Word document, a PDF or an HTML page. Or maybe you want to run a VBS script from the CD instead of creating a full-blown executable.

With autorun you can open any document automatically when you insert the CD.

For those of you with programming knowledge, the program uses the Win32 function 'ShellExecuteEx()' to open the document. This document, picture, audio file etc can be specified in the standard autorun.inf configuration file.

For users who have disabled the auto-play feature of their CD, the autorun program will start the document listed in the configuration file. It does this by reading the configuration file and selects the default shell command.

What You Get

In the download you will find the following files.

  • autorun.exe
  • autorun.inf
  • autorun.ico

These three files comprise this product. Along with these you will find a demonstration PDF document called my_document.pdf. This file is only to demonstrate the product and you should remove it and replace it with your own document, audio file etc.

How To Use It

Unzip the files from the download file into an empty folder on your disk. You can test the program on your hard disk first before writing a CD by double-clicking on the autorun.exe program. When you are happy your document is being started and your right-click menu is defined, use any CD writing software to create a CD, putting the individual files in the root of the disk. When this CD is inserted, the demonstration PDF document will automatically start.

To make your own CDs autorun any document, you need to edit the autorun.inf file provided in the product. The file is shown and described below.

[autorun]

icon=autorun.ico

shell\start\command=autorun.exe "my_document.pdf"

shell\start=Read the PDF Document

shell=start



shell\author\command=autorun.exe "http://www.geode.co.uk"

shell\author=Visit the author's web site

Right Click Menu

The file defines an icon for Windows to display in place of the disk drive icon. You can design your own icon if you wish, using an icon editing tool such as Axialis IconWorkshop.

The file also defines one or more shell commands. Each shell command appears in the right-click menu for the CD, so here we define the text to be shown in the menu along with the program to be run and its arguments. The shell command is given a name to link the command with the menu text. In the demo we have created two shell commands, one called start and another called author.

To run a document from the CD, we added the shell command autorun.exe "my_document.pdf". To start an HTML document, text file, audio file etc, just replace my_document.pdf with the name of your document.

The command that runs automatically is defined by the line shell=start. The right-click menu shows this default command in bold. The command runs when the CD is inserted, or if the user double-clicks on the autorun.exe file. In this case our program reads the autorun.inf file and runs the default command contained in it.

Geode Software is now making this popular product available as a free download, which you are free to use it on as many CDs you like, for commercial and home use.

AttachmentSize
win-arun.zip122.51 KB
win-arun-src.zip137.72 KB