Re: Demo CD - (slightly off topic)
by "Bryan Bateman" <batemanb(at)home.com>
|
Date: |
Tue, 29 Aug 2000 16:17:39 -0400 |
To: |
<Nikki.Lee.Robinson(at)brunel.ac.uk>, <hwg-basics(at)hwg.org> |
Cc: |
<nrobinson(at)iname.com> |
References: |
ac |
|
todo: View
Thread,
Original
|
|
Straight from Microsoft's Platform SDK documentation:
Wouls suggest you put a browser on the CD.
Creating an AutoPlay-Enabled Application
Creating an AutoPlay-enabled CD-ROM application is a straightforward
procedure. You simply include two essential files:
a.. An Autorun.inf file
b.. A startup application
When a user inserts a disc into a CD-ROM drive on a AutoPlay-compatible
computer, the system immediately checks to see if the disc has a personal
computer file system. If it does, the system searches for a file named
Autorun.inf. This file specifies setup application that will be run, along
with a variety of optional settings. The startup application typically
installs, uninstalls, configures, and perhaps runs the application.
a.. Creating an Autorun.inf File
b.. Tips for Writing AutoPlay Startup Applications
Creating an Autorun.inf File
Autorun.inf is a text file located in the root directory of the CD-ROM that
contains your application. Its primary function is to provide the system
with the name and location of the application's startup program that will be
run when the disc is inserted. The Autorun.inf file can also contain
optional information including:
a.. The name of a file that contains an icon that will represent your
application's CD-ROM drive. This icon will be displayed by Microsoft�
Windows� Explorer in place of the standard drive icon.
b.. Additional commands for the context menu that is displayed when the
user right-clicks the CD-ROM icon. You can also specify the default command
that is run when the user double-clicks the icon.
Autorun.inf files are similar to .ini files. They consist of one or more
sections, each headed by a name enclosed in square brackets. Each section
contains a series of commands that will be run by the shell when the disc is
inserted. There are two sections that are currently defined for Autorun.inf
files:
a.. The [autorun] section contains the default AutoPlay commands. All
Autorun.inf files must have an [autorun] section.
b.. An optional [autorun.alpha] section can be included for Microsoft�
Windows NT 4.0 systems running on RISC-based computers. When a disc is
inserted in a CD-ROM drive on a RISC-based system, the shell will run the
commands in this section instead of those in the [autorun] section.
Note The shell checks for an architecture-specific section first. If it does
not find one, it uses the information in the [autorun] section. After the
shell finds a section, it ignores all others, so each section must be
self-contained.
Each section contains a series of commands that determine how the Autorun
operation takes place. There are five commands available:
Command Description
defaulticon Specifies the default icon for the application.
icon Specifies the path and file name of an application-specific icon
for the CD-ROM drive.
open Specifies the path and file name of the startup application.
shell Defines the default command in the CD-ROM's context menu.
shell\verb Adds commands to the CD-ROM's context menu.
The following is an example of a simple Autorun.inf file. It specifies
Filename.exe as the startup application. The second icon in Filename.exe
will represent the CD-ROM drive instead of the standard drive icon.
[autorun]
open=Filename.exe
icon=Filename.exe,1
This Autorun.inf sample runs different startup applications depending on the
type of computer:
[autorun]
open=Filename_x86.exe
icon=IconFile.ico
[autorun.alpha]
open=Filename_RISC.exe
icon=IconFile.ico
Tips for Writing AutoPlay Startup Applications
There are essentially no constraints on how to write an AutoPlay startup
application. You can implement it to do whatever you find necessary to
install, uninstall, configure, or run your application. However, the
following tips provide some guidelines to implementing an effective AutoPlay
startup application.
a.. Users should receive feedback as soon as possible after they insert an
AutoPlay compact disc into the CD-ROM drive. Startup applications should
thus be small programs that load quickly. They should clearly identify the
application and provide an easy way to cancel the operation.
b.. Typically, the initial part of the startup application presents users
with a user interface, such as a dialog box, asking them how they would like
to proceed. Check to see if the program is already installed. If not, the
next step will probably be the setup procedure. The startup application can
take advantage of the time the user spends reading the dialog box by
starting another thread to begin loading the setup code. By the time the
user clicks OK, your setup program will already be partly if not fully
loaded. This approach significantly reduces the user's perception of the
amount of time it takes to load your application.
c.. If the application has already been installed, the user probably
inserted the disk to run the application. As with the setup case, you can
start another thread to begin loading application code to shorten the
waiting time for the user.
d.. Hard disk space may be a limited resource on many systems. Here are a
few hints for minimizing hard disk usage:
a.. Keep the number of files that must be on the hard disk to a minimum.
They should be restricted to files that are essential to running the program
or that would take an unacceptably large amount of time to read from the
CD-ROM.
b.. In many cases, installing nonessential files on the hard disk is not
necessary, but may provide benefits such as increased performance. Give the
user the option of deciding how to make the tradeoff between the costs and
benefits of hard disk storage.
c.. Provide a way to uninstall any components that were placed on the
hard disk. For more information about uninstalling an application, see
Installing Applications.
d.. If your application caches data, give the user some control over it.
Include options in the startup application such as setting a limit on the
maximum amount of cached data that will be stored on the hard disk, or
having the application discard any cached data when it terminates.
e.. Even though a CD-ROM has an Autorun.inf file, AutoPlay can be
suppressed programmatically or disabled entirely with the registry. See
Enabling and Disabling AutoPlay for more information.
----- Original Message -----
From: <Nikki.Lee.Robinson(at)brunel.ac.uk>
To: <hwg-basics(at)hwg.org>
Cc: <nrobinson(at)iname.com>
Sent: Tuesday, August 29, 2000 5:03 AM
Subject: Re: Demo CD - (slightly off topic)
> Hi everybody,
>
> I have produced a HTML conference proceedings, so that viewers can use
> hyperlinks to jump between papers and other related information.
>
> This is all in HTML and works like an offline site which I have put on to
> a CD to be distributed to interested parties!
>
> Now what I'd really like to do is write an "autorun.inf" that opens the
> contents page (contents.html) in the users browser. This saves having to
> put a readme file or other detailed instruction on the CD that will never
> be read.
>
> My question is does anyone know how I should write the autorun.inf file
> (in note pad I realise, but what code?)?
> Oh and I realise it will only work if the user has autorun selected.
>
> Cheers
>
> Nik.
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA