|
|
Introduction
ShellRun is used to AutoRun a CD, ie open a file automatically when the CD is inserted
into a Windows computer. Most people use ShellRun to display a web page
when a CD is inserted.
The page
explains how Windows AutoRuns a CD or DVD, 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.
Usage overview
- and install the freeware development kit.
- Copy the runtime file
ShellRun.exe into your CD image root directory
from your installation directory, eg C:\Program Files\PHD\ShellRun.
- 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
AUTORUN.INF or ShellRun.exe
in the root directory of your CD.
- Your
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
instructions.
- Do not use a file with a name that starts
home
(eg home.htm) because Windows will not display the file you want -
.
Writing an AUTORUN.INF file
If Windows finds a plain text file called 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 AUTORUN.INF.
To get ShellRun to display a web page called index.htm, put this in
AUTORUN.INF. This file is in the development kit:
AUTORUN.INF.
Use the Windows Notepad application to edit plain text files
(it is in the Start+All Programs+Accessories menu).
[autorun]
open=ShellRun.exe index.htm
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:
[autorun]
open=ShellRun.exe subdir\index.htm
You can change the filename (from index.htm) to the name of the file that you want to
show.
You can also add an optional message that is shown in the ShellRun popup window, eg:
[autorun]
open=ShellRun.exe start.htm Please wait while page loads...
This example shows how to display a PDF file, eg using Adobe Acrobat Reader:
[autorun]
open=ShellRun.exe report.pdf Showing project report...
As mentioned above, if the user has not installed Acrobat Reader or equivalent, then the
freeware ShellRun displays this message:
No application is associated with the specified file for this operation
When ready, put AUTORUN.INF and ShellRun.exe
in the root directory of your CD image. Burn the CD and try it out.
|