Desktop version

Main > Knowledge Base > 1C:Enterprise documentation > AutoRun Application > 1C:Enterprise documentation > AutoRun Application > 1C:Enterprise documentation > AutoRun Application

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.

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.

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.

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:

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:

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:

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.

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.

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.

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





© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.