AutoPlay icon

AutoPlay: AUTORUN.INF Basic AutoPlay Settings

An easy-to-use AutoPlay function from James Greene for your CDs and DVDs

backPrevious Nextnext

Basic AutoPlay Settings in AUTORUN.INF

    [AutoPlay Data]
    Document=INFO.HTM
    Viewer=IEXPLORE.EXE
    WindowMode=Normal
    ForceViewer=0
    TopMost=1
    LegalNoticeCaption=Legal Notice
    LegalNoticeText=This CD contains licensed materials. Unauthorized duplication or distribution is strictly prohibited.
    LegalNoticeTextLen=102
    Copyright=Copyright © James Greene 1999-2007
    OEMName=Registered Company Name
    Registration=xxxx-xxx-xxxx-xxxx
    DirFix=1
    Debug=0

where

[AutoPlay Data] required

Identifies the beginning of the AutoPlay-specific settings in the AUTORUN.INF file.

Document=somedoc.ext optional

The name of the document to be opened. If ForceViewer=0, then AUTOPLAY first tries to open the specified document using the local machine's association. For example, if the machine has Microsoft Word installed, and you specify Document=README.RTF, the document will be loaded by Word, even if the Viewer=WORDPAD.EXE has been specified.

Viewer=program.exe optional

This option specifies the program to be used if the machine does not have an application associated with the specified document, or when ForceViewer=1. If the program name contains spaces, enclose the program name in TWO sets of double-quotes, e.g.
""C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe""

WindowMode=mode optional

This option specifies how the Document or Viewer application window should be displayed: Maximized, Normal, or Minimized.

Default: WindowMode=Normal

ForceViewer={0 | 1} optional

If this option is set to 1, the program defined as the Viewer (above) will be started, ignoring any association the user may have for the given Document type. In other words, if the user has associated .HTM documents with their favorite browser, but your CD-R requires a specific browser (which you've included on your CD-R), setting this value to 1 will start the Viewer defined above with the given Document as a command-line parameter. If ForceViewer=0 (the default value), AutoPlay will first try to launch the Document, and if this fails, then it will launch the specified Viewer.


Default: ForceViewer=0

DefaultAction=command-line
-or-
DefaultAction=ECHO message
optional

This value defines what AutoPlay should do when neither the Document nor the Viewer cannot be started. The command-line can contain a program name and parameters, e.g. notepad readme.txt, or simply a document name, e.g. readme.txt. If ECHO is specified, all text following the ECHO command will be displayed in a message box. If this value is not defined, then AutoPlay will display the Windows error message why the document could not be started, e.g. "The specified file could not be found."

Default: DefaultAction=(not defined)

LegalNoticeCaption=window title optional

This value, together with LegalNoticeText, specify that AutoPlay should display a legal notice that the user must read and click OK before they can continue. This value specifies the title for the legal notice message window.


Default: same as CDTitle

LegalNoticeText=text optional

This value specifies the text of the legal notice that AutoPlay should display. This text can now be up to 16 KB (about 16,250 characters) in length. Since many editors do not support very long text lines, this text can be split across multiple lines as shown in the example below:

For example,

   LegalNoticeText=The first line of text\n\
   _LegalNoticeText1=The second line of text. \
   _LegalNoticeText2=More on the second line of text.


will appear as:
Example

Please note: This text can contain line breaks and other special characters. Please consult the Copyright Text page for more information.


Default: (empty)

LegalNoticeTextLen=number optional

This value specifies the length of the legal notice display text. If not specified, this value defaults to 512 (for backward compatibility reasons).

Default: 512

DirFix={0 | 1} optional

Set this value to 1 when AutoPlay.exe is placed in a subdirectory with a separate AUTORUN.INF file. With this setting, AutoPlay is able to find files that are specified in other folders, e.g. Music=...wav

Default: DirFix=1

TopMost={0 | 1} optional

This value is normally set to 1. Set this value to 0 if the AutoPlay splash screen should NOT be marked as a TOPMOST window, in other words, if the splash should disappear behind any windows that subsequently open.

Default: TopMost=1

Copyright=copyright text optional

This option specifies the copyright owner for the CD, and will appear at the bottom of the 'splash' dialog box. This string may contain the code \n for a new-line, for a hexadecimal character code, or nn for an octal (base 8) character code. For example Copright \xa9 1999-2007\nJames Greene will be displayed as:

Copyright © 1999-2007 by
James Greene

since the copyright symbol © has the ASCII code 169 = A9 (hex) = 0251 (octal). In other words, this could be written as \#169, \xa9 or \0251.

The following 'escape' sequences can be used to include special characters in the text:

\n Carriage Return / Newline: Inserts a line break
\r same as \n
\xnn Inserts the character nn, where nn is the hexidecimal value of the character (x01-xFF).
\0nn Inserts the character nn, where nn is the octal value of the character (01-0377).
\#nn Inserts the character nn, where nn is the decimal value of the character (1-255).

Default: Copyright=AutoPlay is Copyright © 1999-2007 by\nJames Greene

OEMName=company name Professional Version only

When you register a commerical license for AutoPlay, you are entitled to use any text you wish for the Copyright= setting. Your commerical registration key is generated from the company name that is entered here.

Registration=registration code  

Enter the registration value that you received when you registered AutoPlay here, or 0 if you are still evaluating AutoPlay.

Debug={0 | 1} optional

When this option is set to 1, AutoPlay will display an error message if it can't read the specified Splash graphic. When this value is 0, AutoPlay will simply not display the Splash screen in this case.

Default: Debug=0

See Also:

Copyright © 1999-2007 by James Greene. All rights reserved. Information subject to change without notice.