CD/DVD Autorun Page
This page allows you to configure CD/DVD autorun commands.
One of the features included in Microsoft Windows even from the first version (Windows 95) is the ability to run a command without any user intervention once a CD/DVD is mounted. A custom icon and label can be specified which will be displayed in Windows Explorer, instead of the standard CD/DVD icon and label.
Autorun.inf is the primary instruction file associated with the Autorun function. Autorun.inf itself is a simple text-based configuration file that tells the operating system which files to start, which icon and drive label to use, and which additional menu commands to make available.
Create Autorun Launcher
Enable or disable the autorun feature. When you enable the autorun functionality an autorun.inf file with your configured settings will be generated in the project output folder, during build time. Also, an autorun launcher file will be generated for executing your commands. If you use Digital Signature functionality to sign your package, the autorun launcher will also be signed. The Autorun Launcher will also have the appropriate UAC requested execution level information set to "As Invoker" for proper behavior under Windows Vista or above.
Display
Launcher Name
Specify a name for the autorun launcher file. If you leave this field blank the default name autorun.exe will be used.
CD/DVD Label
Specify the disk label. This field can be edited using the Smart Edit Control. If you don't specify a disk label the one used when burning the disk will appear in Windows Explorer.
Commands
In this section you can configure autorun commands that will be executed when a disk is mounted or double-clicked in Windows Explorer. You can also configure commands that will appear and execute in the CD/DVD drive's context menu.
New autorun command
When this command is executed a custom user command can be executed (this is useful when opening a file not included in the installation package, but located on the CD/DVD or the target machine).
Adding an autorun command
Use the Insert key while the list is focused.
button, the “Add” context menu item or press theThe following autorun commands are available:
- Package Autorun:
- Install the package - When this command is executed the project MSI installer will be launched (if the product is not already installed). This autorun command also works when using a bootstrapper for your package.
- Install/Play the package - When this command is executed, if the product is installed a specified installation file will be launched, otherwise the package will be installed (this option is suitable especially for game developers).
- File Autorun:
- Open file from CD/DVD - When this command is executed a file located on the CD/DVD will be opened. In case of an executable file you can also specify command line parameters (this suitable for "folder based" installation configurations).
- Open installed file - When this command is executed an installed file will be launched. In case of an executable file you can also specify command line parameters. If the product is not installed, the command will not execute.
- Folder Autorun:
- Browse CD/DVD - When this command is executed an Explorer window will open the mounted disk for browsing starting in the drive's root.
- Open a folder from CD/DVD - When this command is executed an Explorer window will open the mounted disk for browsing starting in a specified folder.
- URL Autorun:
- Navigate to URL - When this command is executed a specified URL will be opened in the default browser.
Edit an autorun command
Use the Space key while an item from the list is selected.
button, the “Edit...” context menu item or press theRemoving an autorun command
Use the Delete key while an item from the list is selected.
button, the “Remove” context menu item or press theSpecifying the autorun commands order
Use the Page Up / Page Down. The order in which the commands will be presented in the CD/DVD drive context menu, is the same with the one displayed in the "Autorun Commands" list.
/ buttons, the “Up” / “Down” context menu items or press theWhen creating or editing an autorun command, the Autorun Command Dialog will be used.
AutoPlay command
Any of the specified autorun commands can be set as the "AutoPlay command". This means that the respective command will be executed when the CD/DVD is mounted or double-clicked (this command will not be visible in the drive's context menu).
Default Command
This command is similar to the AutoPlay command with the following difference: the default command appears bold in the drive's context menu and will execute when the CD/DVD drive is double-clicked.
When you configure both an AutoPlay command and a Default Command,
the Default Command has higher execution priority.
Edit Autorun Command Dialog
Display Text
Specify the localizable text that appears in the CD/DVD drive context menu. This field can be edited using the Smart Edit Control.
Suppose we have the command text: Rea&d Me
First. The CD/DVD drive context menu will have a new item,
“Read Me First” (with D as a hotkey) that launches
Notepad with the file readme.txt loaded. The ampersand
(&) character denotes the hotkey
letter, which is underlined in the menu. If you use
hotkeys, ensure that the letter you wish to use is not already assigned
to a standard Windows context menu choice, such as Copy, Properties, and
Rename. The first listed menu entry for any hotkey gets executed.
Command Target
Depending on the autorun command type chosen in this field, you can select an installation file or folder, a path to a custom user file or a URL.
For a custom autorun command, if you want to
open a file located on the CD/DVD, enter its path relative to the CD/DVD
drive root. Enclose all file paths in quotes and supply any command line
parameters inline.
When choosing to launch an installed file, only key-member files can be selected.
Command Line
For executable installation files, you can specify command line parameters.
When selecting an autorun command for launching the package
installation, you can specify parameters for bootstrapper or Windows Installer.