Skip to Main Content
PC Hardware in a Nutshell, 3rd Edition
book

PC Hardware in a Nutshell, 3rd Edition

by Robert Bruce Thompson, Barbara Fritchman Thompson
July 2003
Beginner to intermediate content levelBeginner to intermediate
874 pages
38h 13m
English
O'Reilly Media, Inc.
Content preview from PC Hardware in a Nutshell, 3rd Edition

Creating an AutoRun CD-R Disc

At times it’s useful to create a CD that, when inserted in the drive, automatically loads and runs a specified program or document. For example, you can distribute HTML content on a CD that automatically invokes the user’s browser and loads index.html. The only thing necessary to enable AutoRun for program files is to put a properly formatted AutoRun.inf file in the root directory of that CD. AutoRun.inf is a plain ASCII text file with the following syntax:

[autorun]
Open=CmdLine

Inserting a CD that contains Notepad.exe and Index.html in the root directory and the following AutoRun.inf:

[autorun]
Open=notepad.exe index.html

causes Windows to AutoRun Notepad.exe and load Index.html into it. You can optionally specify a path before the program or document name. AutoRun.inf supports many more options, which are documented at http://www.microsoft.com/msj/0998/win320998.aspx.

Unfortunately, AutoRun does not honor file associations, which makes it difficult to invoke the user’s browser to run an HTML source file automatically. There are several workarounds for this problem, but the one we prefer is the small utility Autohtml.exe, developed by Mark Trescowthick and Ross Mack, which is available for download at http://www.avdf.com/oct98/art_ot005.html. That page includes full instructions for using the utility.

Repeatedly burning CDs while you are testing your custom AutoRun.inf is time-consuming and wasteful. One alternative is to modify the registry to allow ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Busses

Computer Busses

William Buchanan
Hacker Techniques, Tools, and Incident Handling

Hacker Techniques, Tools, and Incident Handling

Sean-Philip Oriyano, Michael Gregg

Publisher Resources

ISBN: 059600513XErrata Page