AutoRun Application

Download AutoRun templates

Overview

If your 1C:Enterprise applied solutions are delivered on a CD or DVD media, you might want to create the AutoRun application. The application is started automatically when you mount the CD or DVD. It offers end users to install both the platform and the applied solutions.

Both the settings and the interface of the AutoRun application are simple. The AutoRun application displays a dialog box with the following elements:

  1. Title
  2. Background
  3. List of available actions with their descriptions
  4. Exit button

All of these elements are customizable. The list of available actions can include installing applied solutions, viewing documentation, and so on.

You can add the following optional features:

  1. Localization and language selection
  2. Sublists to the main menu, which form a multilevel menu
  3. Predefined installation settings for the 1C:Enterprise platform and for the applied solutions (available only for Windows)

The AutoRun application is available for Windows (autorun.exe) and Linux (autorun) operating systems. The Linux application can run on both 32-bit and 64-bit operating systems.

Creating AutoRun application

You can create the AutoRun application using a free template.

To create the AutoRun application:
  1. Download the AutoRun template.
    It includes the following files and directories:

    platform
    solution
    autorun
    autorun.exe
    autorun.ico
    autorun.inf
    autorun.lst 
    autorun_en.bmp 
    autorun_ru.bmp
    autorunfull.lst
    gdiplus.dll
    guidelines.htm
    SetupV8.cfg
    SetupV8.exe
    setupv8.sh
  2. Edit the file autorun.lst as described in section Specifying AutoRun options.
  3. Edit the file SetupV8.cfg as described in section SetupV8 application (predefined installation settings) (on Windows), or replace the file setupv8.sh with a shell script that installs the platform and the applied solution (on Linux).
  4. Run autorun.exe (on Windows) or autorun (on Linux) to verify the result; debug it if necessary.
  5. Record the AutoRun files to the root directory of your CD or DVD.

The file gdiplus.dll is only required for pre-Windows Vista operating systems.

The directories platform and solution are intended for storing the installation files for the 1C:Enterprise platform and for the applied solution.

Specifying basic AutoRun options

The AutoRun dialog box settings are stored in the file autorun.lst. Its format is similar to that of .ini files, and it is UTF-8 encoded.

This file contains the following sections that you can edit:

[Main] section

This mandatory section describes global dialog box elements.

  • Caption. The dialog box title.
  • Picture. The path to the background image in .bmp format, relative to the directory where autorun.lst is located. The dialog box is auto-sized according to the image size.
  • WarningMsg. The text for the UAC warning. It might be displayed on Windows Vista or later operating systems when you start the AutoRun application.
  • ExitText. The exit button caption.
Example:

[Main]
Caption = 1C:Enterprise 8.3. Training Version
Picture = Picture\autorun.bmp
Exit = Exit

[Language] section

This optional section describes languages available in the AutoRun dialog box. Create a separate section for each language.

  • Locale. The language ID (a string). You will use this ID to mark interface texts written in this language.
  • Name. The language name, as it appears in the list of available languages.

If you specify multiple [Language] sections, the AutoRun dialog box will include a language selection drop-down list.

Example:

[Language]
Name=English
Locale=en

[Language]
Name=Russian
Locale=ru

To learn how to add interface texts in each language, see Adding languages section.

[Element] section

This mandatory section describes the list of actions available in AutoRun, with their descriptions.

  • Name. The action name.
  • Description. The action description.
  • Command. The path to the file that is opened when the user clicks this menu item. For example, you can specify the .exe file that starts the installation, or the .htm file that contains instructions. When the user clicks the command, AutoRun looks for the file using the following algorithm:
    • Add the current disk name to the path.
    • Add the current disk name with a path to autorun.lst directory to the path.
    • Use the path "as is".
  • CommandWindows. The path to the file that is opened when the user clicks this menu item on Windows, relative to the directory where autorun.lst is located.
  • CommandLinux. The path to the file that is opened when the user clicks this menu item on Linux, relative to the directory where autorun.lst is located. 
  • RunAsRoot. The flag that shows whether the file is run as root. If running the file requires superuser rights, set the parameter to 1, otherwise set it to 0. The default value is 0.
  • Marker. The icon to the left of the list entry. It can have one of the following values: Primary (blue icon) or Secondary (yellow icon).

If the Command parameter is not specified and a single operating system-specific command parameter is specified (either CommandWindows or CommandLinux), the element is only available on the specified operating system.

If the Command parameter is specified and no operating system-specific command parameters are specified, the element is available on all operating systems.

If the Command parameter is specified and one or both operating system-specific command parameters are specified (CommandWindows and/or CommandLinux), the element is available on all operating systems and the path to the file is taken from the operating system-specific command parameter (or from the Command parameter, if the operating system-specific parameter is not specified).

Example:

[Element]
Name = Installation instructions
Description = Click here to view installation instructions.
CommandWindows = readme.htm

CommandLinux = xdg-open readme.htm
Marker = Primary

[Element]
Name = Install application
Description = Click here to install the application.
CommandWindows = SetupV8.exe @SetupV8.cfg
CommandLinux = InstallationScript.sh
RunAsRoot = 1
Marker = Primary

The first element opens the file readme.htm. The second element runs the platform installer on Windows, and runs the installation script from the file InstallationScript.sh on Linux (requires root rights).

Adding languages

You can add language selection and then specify translated versions for almost all items in autorun.lst. This includes translation of all texts and specifying different background pictures for different languages.

Each translated item is represented as a separate line in autorun.lst. Its syntax is similar to that of the original item, with the addition of the locale name (except the Locale, Command, CommandWindows, CommandLinux, RunAsRoot, and Marker items, which are locale-independent).

Example:

[Main]
Caption = 1C:Enterprise 8.3. Training Version
Caption_ru = 1С:Предприятие 8.3. Учебная версия
Picture = Pictures/autorun_en.bmp
Picture_ru = Pictures/autorun_ru.bmp
ExitText = Exit
ExitText_ru = Выход

[Language]
Name=English
Name_ru=Английский
Locale=en

[Language]
Name=Russian
Name_ru=Русский
Locale=ru

[Element]
Name = Automatic installation (recommended)
Name_ru = Автоматическая установка (рекомендуется)
Description = This is the recommended installation type.
Description_ru = Это рекомендованный режим установки
Command = install.bat
Marker = Primary

The following languages are available:

  • Azerbaijani (az)
  • Bulgarian (bg)
  • Chinese (zh)
  • English (en)
  • French (fr)
  • Georgian (ka)
  • German (de)
  • Latvian (lv)
  • Lithuanian (lt)
  • Kazakh (kk)
  • Polish (pl)
  • Romanian (ro)
  • Russian (ru)
  • Ukrainian (uk)
  • Vietnamese (vi)

Any item that does not have a locale suffix is treated as default text, which is displayed when translated text is missing. In the example above English texts are treated as default texts.

The default language is determined as follows:

  • If the language matching the locale is defined in autorun.lst, it is the default language.
  • If the language matching the locale is not defined in autorun.lst but English is defined, English is the default language.

We recommend that you always define the English language in autorun.lst.

Adding sublists

You can create multilevel menus in the AutoRun dialog box. Menu items that open menu sublevels are represented as elements in the autorun.lst file.

Example:

[Element]
Name = More options…
Description = Click this item to open a submenu.
Marker = Primary
Command = autorunfull.lst

In this example the file autorunfull.lst contains settings for another AutoRun dialog box with its own set of elements.

The depth of nesting in the AutoRun menu is not limited. In this example, for returning to the top menu level, you have to create an element in the autorunfull.lst file that points to the autorun.lst file (which describes the top menu level).

Example:

[Element]
Name = Back...
Description = Return to the previous menu.
Marker = Secondary
Command = autorun.lst

Starting AutoRun automatically

On Windows, to have AutoRun started automatically when you mount the CD or DVD, the root directory of the disc must contain the autorun.inf file. For a detailed description of the file format, see http://msdn.microsoft.com/en-us/library/windows/desktop/cc144202.>

The following example of the autorun.inf file describes a scenario where the AutoRun file name is autorun.exe and the file is located in the root directory of the disc.

Example:

[autorun]
OPEN=autorun.exe
ICON=autorun.ico

On Linux, to have AutoRun started automatically when you mount the CD or DVD, the root directory of the disc must contain the executable file autorun.sh, a shell script that starts the autorun program.

The following example of the autorun.sh file describes a scenario where the AutoRun file name is autorun and the file is located in the root directory of the disc.

Example:

#!/bin/bash
./autorun 

SetupV8 application (predefined installation settings)

On Windows, you can use the SetupV8.exe application, which is included in the AutoRun template, to perform any of the following actions:

  • Install the 1C:Enterprise 8 platform
  • Install the applied solution Infobase template
  • Create an infobase from the template
  • Run the 1C:Enterprise 8 platform

The setup configuration is stored in a configuration file. In this example, it is the file SetupV8.cfg. To run the setup with the configuration settings described in this file, use the following command:

SetupV8.exe @<path to SetupV8.cfg relative to SetupV8.exe directory>

If the path is not specified, AutoRun looks for SetupV8.cfg file in the directory where SetupV8.exe is located.

The format of the configuration file is similar to that of .ini files, and it is UTF-8 encoded. The number sign # comments out the line, any text following it is ignored.

This file contains the following sections that you can edit:

[Platform] section

This mandatory section describes the installation settings for the 1C:Enterprise platform package.

  • MsgBeforePlatform. If this line is present, a message is displayed before platform installation. The message text is specified in <Language> sections.
  • Location. The path to the installation file, relative to SetupV8.exe directory.
  • CmdLine. Command-line parameters for the installer:
    • DEFLANGUAGE. The default platform language.
    • REINSTALL. Describes the list of features that are to be reinstalled. For details, see http://msdn.microsoft.com/en-us/library/aa371175(v=vs.85).aspx.
    • REINSTALLMODE. Describes the type of reinstall to perform. For details, see http://msdn.microsoft.com/en-us/library/aa371182(v=vs.85).aspx.
    • HASPInstall. Defines whether HASP key installation is used. The HASP key installation can only be performed if you run the installation application with the full interface (UI = 5).
    • Any of the parameters available in the InstallComponents entry of the 1CEStart.cfg file: DESIGNERALLCLIENTS, THINCLIENT, THINCLIENTFILE, SERVER, WEBSERVEREXT, CONFREPOSSERVER, and SERVERCLIENT.
  • UI. Defines the verbosity level of the installation application GUI:
    • 3. Progress bar only.
    • 5. Regular (full) interface of the installation application.
  • PackageName. The installation file name (with the .msi extension).
  • MsiVersion. The minimum version of the Windows Installer component required to install the 1C:Enterprise platform.
  • MsiW. The path to the executable file of the Windows Installer component that will be used if the local Windows Installer version does not meet the requirement specified in MsiVersion, relative to the directory where SetupV8.cfg is located.
  • MsgAfterPlatform. If this line is present, a message is displayed after platform installation. The message text is specified in the <Language> sections.
Example:

[Platform]
MsgBeforePlatform
Location = 1CV8
CmdLine = REINSTALLMODE=vomus REINSTALL=ALL HASPInstall=no DEFLANGUAGE=EN
UI = 5
PackageName = 1CEnterprise 8.msi
MsiVersion = 2.0.2600.2
MsiW = WindowsInstaller-KB893803-x86.exe
MsgAfterPlatform

[CFG] section

This mandatory section describes installation settings for the 1C:Enterprise platform package.

  • Location. The path to the distribution package, relative to the directory where SetupV8.exe is located.
  • CfgDestination. The applied solution template installation directory, relative to the directory where SetupV8.exe is located. It must match the applied solution template installation foder that you specified during the creation of the application distribution kit. 
  • Version. The applied solution version.
  • Config1. Shows whether the applied solution Infobase is created after template installation.
    • 0. Do not create the Infobase.
    • 1. Create the Infobase.
  • Config2. Shows whether the applied solution demo Infobase is created after template installation.
    • 0. Do not create the Infobase.
    • 1. Create the Infobase.
  • MsgBeforeCFG. If this line is present, a message is displayed before the applied solution installation. The message text is specified in <Language> sections.
  • MsgAfterCFG. If this line is present, a message is displayed after the applied solution installation. The message text is specified in <Language> sections.
  • CFGLoad. If this line is present, a message is displayed while the applied solution template is being loaded. The message text is specified in <Language> sections.
  • CFGError. If this line is present, a message is displayed if an error occurs while loading the applied solution template. The message text is specified in <Language> sections.
  • MsgBeforeIB. If this line is present, a message is displayed before Infobase creation. The message text is specified in <Language> sections.
  • IBCreate. If this line is present, a message is displayed during Infobase creation. The message text is specified in <Language> sections.
  • MsgAfterIB. If this line is present, a message is displayed after Infobase creation. The message text is specified in <Language> sections.
  • AppLaunch. If this line is present, a message is displayed before the applied solution is started. The message text is specified in <Language> sections.
Example:

[CFG]
Location=configs\smallbusiness
CfgDestination=1C\smallbusiness
version=1.0.0.0
Config1=1
Config2=1
MsgBeforeCFG
MsgAfterCFG
CFGLoad
CFGError
MsgBeforeIB
IBCreate
MsgAfterIB
AppLaunch

[<Language>] section

This mandatory section contains the localized text strings. Create multiple sections of this type, one for each installer language.

Use the language names from the following list as section names: Azerbaijani, Bulgarian, Chinese, English, French, Georgian, German, Kazakh, Latvian, Lithuanian, Polish, Romanian, Russian, Turkish, Ukrainian, and Vietnamese.

  • Title. The setup window title.
  • IBCreate. The message displayed during Infobase creation. The variable %1 represents the Infobase name.
  • AppLaunch. The message displayed before the applied solution is started.
  • CFGLoad. The message displayed while the applied solution template is being loaded.
  • CFGError. The message displayed if an error occurs while loading the applied solution template.
  • MsgBeforePlatform. The message displayed before platform installation.
  • MsgAfterPlatform. The message displayed after platform installation.
  • MsgBeforeCFG. The message displayed before the applied solution installation.
  • MsgAfterCFG. The message displayed after the applied solution installation.
  • MsgBeforeIB. The message displayed before Infobase creation.
  • MsgAfterIB. The message displayed after Infobase creation.
Example:

[English]
Title = Setup
IBCreate = Creating the %1 infobase. This process can take a few minutes.
AppLaunch = Starting 1C:Enterprise...
CFGLoad = Preparing to install the applied solution...
CFGError = Error writing to the templates directory. Probably you have no rights to write there.
MsgBeforePlatform = Installing 1C:Enterprise...
MsgAfterPlatform = 1C:Enterprise installation complete.
MsgBeforeCFG = Installing the applied solution...
MsgAfterCFG = Applied solution installation complete.
MsgBeforeIB = Creating the infobase...
MsgAfterIB= The installation is complete. Click OK to start 1C:Enterprise.

Next page: System requirements

Get more details: Downloads


Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.