ShellRun is used to AutoRun a CD, DVD or USB-stick, ie open a file automatically when inserted
into a Windows computer. Most people use ShellRun to display a web page
when a CD is inserted.
explains how Windows AutoRuns a CD, DVD or USB-stick, and cautions that AutoRun may have been disabled so you should
always provide instructions for viewing your CD manually.
(Also see the article.)
If there is no viewer program for your file type (eg if your user does not have Adobe Acrobat Reader
installed to display your PDF file) then the freeware ShellRun will display an error and exit.
The lets you cope in this situation, eg prompting
the user to install the viewer program from your CD or the web.
- and install the freeware development kit.
- Copy the runtime file
ShellRun.exe into your CD image root directory
from your installation directory, eg
- Write a plain text
AUTORUN.INF file ()
and put it in your CD image root directory.
- Burn a CD and try it out.
What ShellRun does
If all goes well, Windows will run ShellRun when your CD is inserted.
ShellRun will display a popup window and ask Windows to show your requested file.
The popup window disappears after 15 seconds.
The popup window is shown in the top left hand corner of the screen;
see the example on the right. You can change the text of the bottom line of the window.
If the user clicks in the popup window, their default browser will be started
to show the PHD Computer Consultants Ltd web site.
If you want to remove or customise the popup window (or use a splash screen instead)
then you need to buy the of ShellRun.
What can go wrong?
- If ShellRun does not start, these are possible explanations:
- You forgot to put
in the root directory of your CD.
AUTORUN.INF format is incorrect - check below.
- If ShellRun cannot find the file you requested, then it changes the bottom text
line, eg as follows:
- If there is no suitable viewer for the file you requested, then ShellRun changes
the bottom text line, eg as follows for a PDF file.
If you want to handle this situation better, you need to buy the
and follow its
- Do not use a file with a name that starts
home.htm) because Windows will not display the file you want -
Writing an AUTORUN.INF file
If Windows finds a plain text file called
When ready, put
AUTORUN.INF in the root directory
of a CD, then it follows the instructions in this file to run a program.
See the page for full details
of the available commands for
To get ShellRun to display a web page called
index.htm, put this in
AUTORUN.INF. This file is in the development kit:
Use the Windows Notepad application to edit plain text files
(it is in the Start+All Programs+Accessories menu).
In this freeware version of ShellRun, make sure that the filename has no spaces.
If the file you want to display is in a sub-directory, use a back-slash character after
each directory name (ie not a URL-style forward slash /), eg:
You can change the filename (from
index.htm) to the name of the file that you want to
You can also add an optional message that is shown in the ShellRun popup window, eg:
This example shows how to display a PDF file, eg using Adobe Acrobat Reader:
open=ShellRun.exe start.htm Please wait while page loads...
As mentioned above, if the user has not installed Acrobat Reader or equivalent, then the
freeware ShellRun displays this message:
open=ShellRun.exe report.pdf Showing project report...
No application is associated with the specified file for this operation
Finally, make your CD AutoPlay nicely by adding in "icon", "action" and "label" commands, eg:
in the root directory of your CD image. Burn the CD and try it out.