How to create a CD autorun file
If you have produced the contents for your CD and then want them to autoplay when the disc is loaded into a computer then you should add an autorun file to the CD. An autorun file is a simple text file that tells the operating system which executable file to start.
There are two main types of autorun file that you could use:
Autorun using the ‘open’ command
The open command is compatible with any PC running Windows 95 or later (although it is possible to manually disable the autorun feature on any computer, so if someone cannot view your autorun application then this may be a reason). However it can only be used for opening executable files ending in .exe such as Flash presentations, it cannot be used for opening documents such as Word files, PDFs or web pages. To open documents rather than executable files using autorun please look at the shellexecute command instructions below.
The icon for the autorun file looks like the one below and the text file is called autorun.inf
In the above window the flashfile.exe part should be replaced with the filename that you wish to open.
To download a open autorun.inf file to use yourself, please right click here and go to ‘Save Target As…’ and save it to a suitable location on your computer. Then edit the flashfile.exe part to suit your own requirements.
Autorun using the ‘shellexecute’ command
The open command is compatible with any PC running Windows 95 or later (although it is possible to manually disable the autorun feature on any computer, so if someone cannot view your autorun application then this may be a reason). However it can only be used for opening executable files ending in .exe such as Flash presentations, it cannot be used for opening documents such as Word files, PDFs or web pages. To open documents rather than executable files using autorun please look at the shellexecute command instructions below.
The icon for the autorun file looks like the one below and the text file is called autorun.inf
In the above window the index.html part should be replaced with the filename that you wish to open, such as the name of the PDF or the name of the webpage that you would like to open up first. If for example the file to open was called index.html and it was in a folder called website then the second line of the autorun file should be shellexecute=website/index.html
To download a shellexecute autorun.inf file to use yourself, please right click here and go to ‘Save Target As…’ and save it to a suitable location on your computer. Then edit the index.html part to suit your own requirements.
Notes about autorun files
Do not use any spaces in the file name of the document or exe file that you are linking to, always replace spaces with underscores (e.g. my_presentation.pdf ), otherwise the autorun will not work.
The autorun.inf file should always be in the top level (root folder) of the CD and not placed within a folder.
For PowerPoint presentations you do not need to create an autorun file and should use the autorun feature built-in to PowerPoint (found under ‘Publish’ and then ‘Package for CD’).