Launching 1c from the command line with parameters. Development of the configurator agent mode. Batch Commands

Whole line actions that simplify the work of users in the program and perform certain administrative tasks with the database can be performed using the 1C startup parameters:

  • Set up a schedule Reserve copy databases;
  • Automate data updating (for example, daily update exchange rates);
  • Provide automatic user authorization without the need to enter a username and password;
  • Launch a specific base and a specific version of the platform without the need to choose;
  • And many many others.

Entering parameters in the base selection window

Standard selection window information base(Fig. 1) in addition to selecting the launch mode (Configurator or 1C Enterprise) has four more functional buttons:

  • Add;
  • Change;
  • Delete;
  • Customization.

If, having selected the infobase, press the "Change" button and skip the first dialog box, a form will open (Fig. 2).

Fig. 2

The input field under the inscription "Additional launch parameters:" allows you to enter some keys:

  • / N "Username" - this string means that the program will be launched under the user whose name is indicated in quotes;
  • / P "Password" - if user authentication involves entering a password, it must be specified in the parameter value;
  • / UC "Code" - using this parameter allows you to unblock infobase connections (blocking is required when exclusive access is required).

Thus, the line of the form "/ N" Ivanov Ivan Ivanovich "/ P" 1234 "" saves the user at a certain workplace from the need to constantly log in at system startup.

Options in the shortcut

The above parameters can be written elsewhere. By calling context menu program shortcut, and by going to its properties, you can get a window (Fig. 3)

Fig. 3

To enter the parameters, we need the "Object" input field.

First of all, you should decide on the application launch mode:

  • DESIGNER (in 8.0 this is the CONFIG parameter) allows you to run the program in the configurator mode.
  • ENTERPRISE means launching a regular application.

Then you can write a specific base for launching, thereby we will restrict the user access to other bases registered in the system. Depending on the operating mode, the parameter can take several values:

  • / F "base address" - used if the work is carried out in file mode;
  • / S "server name" \ "name of the database on the server" - starts the database in client-server mode;
  • / WS "address" - to establish a connection to the web server.

In the latter case, user authentication may be required at the remote web server... A number of parameters allow fine tuning:

  1. Wsn - username under which the connection to the server will be made;
  2. Wsp - password of the above user;
  3. Wspsrv - proxy address;
  4. Wspport is the port of the corresponding proxy server.

If, after adding these parameters to the properties of the 1C shortcut, you add the authorization parameters specified in the previous section, you can implement the ability to launch a specific database with a simple double click without additional windows. This is very convenient when in the process of testing and development it is necessary to frequently restart the application, as well as in cases when there is a need to restrict user access to the list of databases registered on the computer.

By copying the created shortcut to the "Autostart" folder, you can further optimize the system operation (Fig. 4).

Fig. 4

Now, when the system starts, the application will be launched in the prescribed mode, for a specific base and under a specific user.

Turning on and shutdown windows user authentication is performed by the parameters / WA + and / WA-

Command line and parameters

In fact, the line written in the "Object" field can be copied practically without corrections to the command line launched via Start-> All Programs-> Accessories-> Run. The result will be the same.

Here you can specify several parameters, which are also possible to use from command line:

  • CREATEINFOBASE - allows you to create an infobase of a certain type (the template file must have the extension (dt or cf);
  • ConnectionString is a required parameter that specifies the location the base being created, must consist of a pair of Parameter Name and Value, united by an equal sign (example of a string for the file-based mode of operation: File = "D: \ 1c database \ 1Cv8Log" for server databases Srvr = "Server3");
  • DBMS - depending on the specified value, describes what type of database server is used.

Database backup using 1C command line parameters

To perform this important operation, you can use a notepad or other text editor create bat file, the launch schedule of which should be written in the corresponding windows menu or on the server.

Outcome

In this article, we did not intend to fully describe all possible system startup parameters, which can be viewed in the corresponding menu of the Syntax Assistant. We tried to give a general idea of ​​this feature and some examples of its use.

Mode selection command line parameters:

CONFIG
launch of the 1C: Enterprise 8 system in the "Configurator" mode

ENTERPRISE
launch of the 1C: Enterprise 8 system in the "1C: Enterprise" mode

CREATEINFOBASE
creating delivery and update files


a string specifying infobase parameters, each of which is a fragment of the form
,
where Parameter name is the parameter name, and Value is its value. Fragments are separated from each other by ";" symbols. If the value contains whitespace characters, then it must be enclosed in double quotes (").

File mode options

File infobase directory;
Locale language (country) to be used when creating the infobase. The valid values ​​are the same as the parameter of the Format method. The Locale parameter is optional. If not specified, the regional settings of the current infobase will be used.

Client-server mode options

Srvr server name 1C: Enterprise;
Ref name of the infobase on the server;
SQLSrvr name SQL Server;
SQLDB name SQL databases data;
SQLUID SQL username;
SQLPwd SQL user password. If the password for the SQL user is not specified, then this parameter can be omitted.
SQLYOffs - date offset used to store dates in SQL Server... It can take values ​​0 or 2000. This parameter is optional. If not specified, the value 0 is accepted.
Locale - language (country), (similar to the file variant).

The parameters are defined for all variants:

Usr Username;
Pwd password

/ AddInList the parameter showing under what name to add the base to the list; if not specified, the base will not be added to the list. If a name is not specified, a default is used, similar to the interactive creation of an infobase.
Simultaneous use of keys is not allowed.

Command line parameters for specifying startup parameters:

/@
command line parameters are written in the specified file

/ F
path to the infobase, if it is stored in a file (you do not need to specify the file name)

/ S
the address of the infobase stored on the 1C: Enterprise 8 server is added in the following way:

/ N
Username. Should be specified in the same way as in the list of users created in the Configurator

/ P
the password of the user whose name is specified in the / N parameter. If the user does not have a password, this parameter can be omitted

/ WA-
prohibiting the use of Windows authentication at the start of Enterprise or the Configurator

/ WA +
setting the mandatory use of Windows authentication at the start of 1C: Enterprise or the Configurator. If the / WA switch is not specified, it is assumed that the / WA + command line parameter is used

/ AU-
prohibition of displaying the question about updating the current version of 1C: Enterprise from the administrative installation

/ AU +
setting the output of the question about updating the current version of 1C: Enterprise from the administrative installation. If the / AU switch is not specified, it is assumed that the / AU + command line parameter is used

/ Out
[-NoTruncate]
installation of a file for displaying service messages. If the NoTruncate key is specified (separated by a space), the file is not cleared

/ L
a directory of localized interface resources is specified (for example, "RU")

/ DisableStartupMessages
Suppresses startup messages: “The database configuration does not match the saved configuration. Continue?"; “Your computer is not powerful enough to edit the configuration help. Microsoft must be installed to edit the Help Internet Explorer version 6.0 or higher. "; “Your computer's capabilities are not enough for editing html documents, including help topics. To edit html-documents, you need to install Microsoft Internet Explorer version 6.0 or higher. V this launch editing html-documents will not be available. "

/ C
passing parameter to configuration

Batch mode

Using command line parameters, the administrator can launch the configurator in batch mode to perform the following actions:

  • updating the configuration of the database, including those under support;
  • performing syntactic control;
  • testing and correcting the infobase with setting all parameters;
  • reduction of the log book;
  • performing a configuration check.
  • The administrator can use command line parameters to specify:

    • launching the 1C: Enterprise 8 system in the Configurator mode;
    • infobase parameters: user, password; for the file version - directory, language; for the client-server version - server name, infobase name, SQL server name, SQL database name, SQL username and password, date offset.

    In addition, all startup parameters can be generated in an external file, the name of which is specified in the command line parameters.

    After completing the actions specified in the startup parameters, the 1C: Enterprise configurator is closed.

    Using the configurator batch launch mode allows you to automate the infobase maintenance process by launching the corresponding command files on a schedule.

    Configurator batch mode command line parameters:

    / DumpIB
    unloading an infobase in command mode

    / DumpCfg
    saving configuration to file

    / UpdateDBCfg
    [-WarningsAsErrors]
    updating the database configuration. If the Warnings-AsErrors key is specified (separated by a space), then all warning messages will be treated as errors

    / DumpDBCfg
    saving database configuration to file

    / RollbackCfg
    return to database configuration

    / CheckModules
    do syntactic control

    / UpdateCfg
    updating a supported configuration

    / IBCheckAndRepair [-ReIndex]
    [-LogIntergrity] [-RecalcTotals]
    [-IBCompression]
    [-TestOnly | [-BadRefCreate |
    -BadRefClear | -BadRefNone]
    [-BadDataCreate |
    -BadDataDelete]]
    test and fix the infobase

    ReIndex
    re-indexing tables

    LogIntergrity
    logical consistency check

    RecalcTotals
    recalculation of totals

    IBCompression
    compress tables

    TestOnly
    only testing when there are references to non-existent objects:

    BadRefCreate
    create objects

    BadRefClear
    clear objects

    BadRefNone
    do not change

    With partial loss of objects:

    BadDataCreate
    create objects

    BadDataDelete
    delete objects

    The simultaneous use of keys within a subgroup of parameters is not allowed. If the command is successful, it returns a return code of 0, otherwise 1 (101 if there are errors in the data).

    Command line parameters for batch mode for creating distribution and update files:

    / CreateDistributionFiles
    [-cffile]
    [-cfufile
    [-f | -v] +]
    Create delivery and update files

    Cffile
    instruction to create a distribution

    Cfufile
    instruction to create an update

    F
    the distribution kit included in the update is specified by the name

    V]
    the distribution included in the update is specified by the version

    Note: the -f | -v parameter group is repeated as many times as the distribution files are included in the update.

    Command line parameters for working with the configuration repository:

    / DepotF
    storage directory

    / DepotN
    repository username

    / DepotP
    vault user password

    V
    v - version number, if version number is not specified, or equal to -1, will be saved latest version.

    / DepotUpdateCfg [-v] [-revised]
    Update storage config from file (batch mode)

    V
    version number, if the version number is not specified, or is equal to -1, the latest version will be saved, if the configuration is connected to the repository, then the parameter is ignored

    Revised
    get captured objects if required. If the configuration is not connected to the repository, then the parameter is ignored.

    Command line parameters for batch mode registration of 1C: Enterprise 8 as an Automation server:

    / RegServer
    application registration

    / UnregServer
    remove app registration

    After completion, it closes the 1C: Enterprise 8 system.
    If parameter values ​​include spaces (for example, path or file name), the values ​​must be enclosed in quotation marks.

    Examples of

    How to start 1C: Enterprise 8 from the command line

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "ENTERPRISE / F D: \ Configuration \ Typical \ ControlTorg / N Username / P Password

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "ENTERPRISE / S Server \ Base / N Username / P Password

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F D: \ Configuration \ Typical \ ControlTorg / N Username / P Password

    How to force 1C: Enterprise to unload the database from the command line

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F D: \ ControlTorg / N Username / P Password / DumpIB c: \ name.dt

    How to update changes to the current configuration in the database configuration from the command line

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F D: \ ControlTorg / N Username / P Password / UpdateDBCfg

    How to test and fix an infobase without checking referential integrity in automatic mode

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F" C: \ DemoTrd2 "/ N" Fedorov (administrator) "/ P" "/ IBcheckAndRepair -LogIntegrity

    How to perform a configuration check in automatic mode with the output of the check results to a file

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F" C: \ DemoTrd2 "/ N" Fedorov (administrator) "/ P" "/OutD:\my\log.txt / CheckConfig -ClientServer -Client -ExternalConnectionServer -ExternalConnection -Server -DistributiveModules -IncorrectReferences -ConfigLogicalIntegrity -UnreferenceProcedures -HandlersExistence -EmptyHandlers

    How to shorten the log file programmatically

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F" C: \ DemoTrd2 "/ N" Fedorov (administrator) "/ P" "/OutD:\my\log.txt / ReduceEventLogSize 2004-12- 26 -saveAsC: \ OldLog.elf

    How to unload application modules as text files from the command line

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F" C: \ DemoTrd2 "/ N" Fedorov (administrator) "/ P" "/ DumpConfigFiles" D: \ 1 \ 11 "-Module

    How to load help files saved in htm format into an application solution

    C: \ Program Files \ 1cv8 \ bin \ 1cv8.exe "CONFIG / F" C: \ DemoTrd2 "/ N" Fedorov (administrator) "/ P" "/ LoadConfigFiles" D: \ 1 \ 11 "-Help

    Often, when working with 1C, it is necessary to carry out some kind of operations of the same type, which are repeated systematically in time and simply distract from the main work. These can be various downloads and unloads, the formation of some kind of data for external analysis, etc. There is a fairly simple way to automate these operations and actually forget about them, periodically receiving log files by mail for control.

    It's great if you have already written these operations with external processing, no problem, if this is not the case, create and transfer everything there. Further, to check the functionality, I recommend testing all this in manual mode and then, if everything works as it should, rewrite the main processing code in such a way that when external processing is loaded, it starts automatically, without pressing the button, execute, and the like. The simplest thing is to move the code into the procedure OnOpen ().

    The next step is to automatically close the program after performing the external processing, which we have created and it is already working for us. To do this, in the procedure OnOpen () at the very end, insert the following command: EndSystemWork (False); in this case the parameter RequestOpportunity we pass the value "False" to cut off various options for additional system questions when closing, thereby initiating an unconditional shutdown of 1C after performing this external processing. To be sure, we run the program again and perform processing and make sure that it worked and the program closed itself.

    "C: \ Program Files (x86) \ 1cv8 \ 8.3.5.хххх \ bin \ 1cv8.exe" ENTERPRISE / DisableStartupMessages / FС: \ path to database / N "Username" / P "UserPassword" / Execute c: \ path to processing \ self-processing.epf

    Let's decipher:

    1. "C: \ Program Files (x86) \ 1cv8 \ 8.3.5.хххх \ bin \ 1cv8.exe" ENTERPRISE - the 1C engine itself in this case is 8.3, check the path yourself, it differs depending on the version and engine including do not forget to edit it after updating the last one.

    2. / DisableStartupMessages - disable all messages at system startup.

    4. / N "UserName" / P "UserPassword" - respectively / N username, also immediately without a space and / P password.

    5. / Execute c: \ path to processing \ self-processing.epf - / Execute starts our processing, the path and name must follow this key.

    Now that's all, it remains only to add our cmd file to the task scheduler: avtozapusk1c.cmd by specifying the schedule for its launch.

    To track the work of external processing, I recommend creating a separate user for it, it is still optimal that the processing itself creates a log file, which also periodically falls to your mail.

    These are not clever tools that help automate everyday routine operations, good luck to you!

    For 7.7:
    CONFIG - configurator
    DEBUG - debugger
    ENTERPRISE - enterprise
    / D<Путь>- information database directory
    / U<Путь>- user directory
    / N<Имя>- username as it appears in the user list
    in the configurator
    / P<Пароль>- password of the user whose name is specified in the / N parameter
    / M - exclusive mode
    / T<Путь>- parameter to override the directory of temporary files
    If the path looks like c: \ Program Files \ folder, then to run
    the entire path must be taken to "" - / D "C: \ Program Files \ base1c"

    A) for the command line (bat file):
    С: Program Files / 1Cv77 / BIN / 1CV7.exe / DC: / Base1C
    b) for shortcut (quotes appear):
    "C: Program Files / 1Cv77 / BIN / 1CV7.exe" / DC: / Base1C

    For 8.x:
    CONFIG launch of the 1C: Enterprise system in the "Configurator" mode;
    ENTERPRISE launch of the 1C: Enterprise system in the "1C: Enterprise" mode;
    CREATEINFOBASE ] creating an information base

    a string specifying infobase parameters, each of which is a fragment of the form
    <Имя параметра=><Значение>,
    where Parameter Name is the name of the parameter and Value is its value.
    Fragments are separated from each other by ";" symbols.
    If the value contains whitespace characters, it must be enclosed in double quotes (").

    Examples of using parameters:

    Opening 1C: Enterprise for the file version:
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / F "D: \ 1C_base \ ZUPRAZR" / N "Admin" / P "12345"

    Opening 1C: Enterprise for the client-server version:
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / S "server-1C \ ZUP" / N "Admin" / P "12345"
    If one server has 8.1 and 8.2, then when connecting to 8.2 databases, you need to specify the server port (for example, 1641):
    "C: \ Program Files \ 1cv82 \ common \ 1cestart.exe" ENTERPRISE / S "server-1C: 1641 \ ZUP" / N "Admin" / P "12345"

    Launching the program as a user and executing processing upon opening:
    "C: \ Program Files \ 1cv82 \ 8.2.11.235 \ bin \ 1cv8s.exe" ENTERPRISE / F "D: \ 1C \ HRM" / N user / P password / Execute "D: \ 1C \ External_1C_Processes \ RunningProcesses \ WorkDesk. epf "

    To unblock the establishment of connections to the infobase
    in cmd: start C: \ Progra ~ 1 \ 1cv81 \ bin \ 1cv8.exe / UC "access code"
    in the shortcut: "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / F "D: \ 1C \ HRM" / N "Ivanov I.I." / P "Password" / UC 456743

    Run 1C under you on the user's machine if Windows authentication is installed
    C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe "/ WA-
    In this case, 1C at the entrance will definitely require you to enter a password.

    Creating a configuration template file
    DESIGNER / F "D: \ V8 \ Cfgs81 \ IB81" / CreateTemplateListFile "templates.lst" -TemplatesSourcePath "D: \ V8 \ Cfgs81 \ tmpIts"

    Examples of working with the repository:
    for a configuration not attached to the current store
    DESIGNER / F "D: \ V8 \ Cfgs82 \ IB82" / ConfigurationRepositoryF "D: \ V8 \ Cfgs82" / ConfigurationRepositoryN "Administrator" / ConfigurationRepositoryReport "D: \ ByObject.mxl" -NBegin 1 -NEnd 2 –GroupByObject
    for a configuration attached to a repository, information for reports is taken from the current repository
    DESIGNER / F "D: \ V8 \ Cfgs82 \ IB82" / ConfigurationRepositoryReport "D: \ ByComment.mxl" -NBegin 1 -NEnd 2 -GroupByComment

    Create a database and register it in the list of databases for the user:
    Will create a base with configurations from the 1Cv8.cf file in the created folder "test3" on disk E and add the path to the base to the list of bases under the name "TEST33".
    "C: \ Program Files \ 1cv82 \ common \ 1cestart.exe" CREATEINFOBASE File = e: \ test3; / AddInListTEST33 / UseTemplate "C: \ Documents and Settings \ User \ My Documents \ tmplts \ TestVendor \ TestConfig \ 1Cv8.cf"

    As of 8.2.12, the installer registers the COM connection "for the computer". It is possible to perform registration "for the user" using the command line
    regsvr32 / n / i: user comcntr.dll


    We create a user for a specific action, set the appropriate values ​​in the user settings rights, for example, the checkbox "Auto-load currency rates at the start of the program" for Accounting or "Load current exchange rates at system startup" for UPP.
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" enterprise / SServer-1C \ 1C-Work / NAdmin / P12345 /Out"C:\Logi1C\log.txt "-NoT_runcate / DisableStartupMessages
    In general, this idea came to my mind when I spied in a non-standard config that the User can also put a global procedure on execution when he logs in to the system. In the standard ones, you can use the / Execute parameter, creating a processing, for example, launching additional posting of documents and after the system terminates:
    // unconditional termination of the program
    EndSystemWork (False);
    Automatic saving of databases by means of 1C:
    1) create a .bat file with a string
    "C: \ Program Files \ 1cv82 \ common \ 1cestart.exe" DESIGNER / S Server-1C \ 1C-Work82 / N "Administrator" / P "12345" / DumpIB \\ bdc \ BackUp \ Base_% date-10%. dt
    2) create a scheduled task on the server with admin rights with the execution of this file at a specific time.
    Knowing the format of the date output, you can look through echo% date%, you can select individual parts of the date to form a more convenient file representation using symbols, for example:
    % date3% - output from the third character
    % date3,2% - output 2 characters starting from the third

    Example file for updating the configuration
    echo off
    cls
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / S "server \ ESKM" / N "Admin" / P "ESKM" / DisableStartupMessages / C "ShutdownUsers"
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" CONFIG / S "server \ ESKM" / N "Admin" / P "ESKM" / DisableStartupMessages / UpdateDBCfg / UC "Batch UpdateIBConfiguration"
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / S "server \ ESKM" / N "Admin" / P "ESKM" / C "AllowUsers" / UC "BatchUpdateIBConfiguration"

    To unblock the establishment of connections to the infobase, you need to:
    Enter the infobase using the "/ UC" startup parameter with the same access authorization code that was specified when the lock was set.

    Run this processing, specifying "Unblock connections" as the blocking action.

    Press the "Execute" button.

    In cmd
    start C: \ Progra ~ 1 \ 1cv81 \ bin \ 1cv8.exe / UC<код доступа>

    In the label
    "C: \ Program Files \ 1cv81 \ bin \ 1cv8.exe" ENTERPRISE / F D: \ Configurations \ Typical \ Control / N Username / P Password / UC 456743

    More about parameters
    The parameter is defined for the file variant:
    File - infobase directory;

    Locale - language (country) that will be used when creating an infobase. Valid values ​​are the same as parameter<Форматная строка>method Format. The Locale parameter is optional. If not specified, the regional settings of the current infobase will be used.

    For the client-server version, the parameters are defined:
    Srvr - 1C: Enterprise server name;

    Ref - name of the infobase on the server;

    SQLSrvr - SQL server name;

    SQLDB is the name of the SQL database;

    SQLUID - SQL username;

    SQLPwd - SQL user password. If the password for the SQL user is not specified, then this parameter can be omitted.

    SQLYOffs is the date offset used to store dates in SQL Server. It can take values ​​0 or 2000. This parameter is optional. If not specified, the value 0 is accepted.

    Locale - language (country), (similar to the file variant).

    The parameters are defined for all variants:

    Usr - username;

    Pwd - password

    / AddInList
    the parameter showing under what name to add the base to the list; if not specified, the base will not be added to the list. If a name is not specified, a default is used, similar to the interactive creation of an infobase.

    Simultaneous use of keys is not allowed.

    Command line parameters for specifying startup parameters:

    /@<имя файла>
    command line parameters are written in the specified file

    / F<Путь>
    path to the infobase, if it is stored in a file (you do not need to specify the file name)

    / S<Адрес>
    the address of the infobase stored on the 1C: Enterprise 8.0 server is as follows:

    <Имя компьютера, работающего сервером приложений>\ <Ссылочное имя информационной базы, известное в рамках сервера 1С:Предприятия 8.0>

    / N<Имя>
    Username. Should be specified in the same way as in the list of users created in the Configurator

    / P<Пароль>
    the password of the user whose name is specified in the / N parameter. If the user does not have a password, this parameter can be omitted

    / WA-
    prohibiting the use of Windows authentication at the start of Enterprise or the Configurator

    / WA +
    setting the mandatory use of Windows authentication at the start of 1C: Enterprise or the Configurator. If the / WA switch is not specified, it is assumed that the / WA + command line parameter is used

    / AU-
    prohibition of displaying the question about updating the current version of 1C: Enterprise from the administrative installation

    / AU +
    setting the output of the question about updating the current version of 1C: Enterprise from the administrative installation. If the / AU switch is not specified, it is assumed that the / AU + command line parameter is used

    / Out<Имя файла>
    [-NoT_runcate]
    installation of a file for displaying service messages. If the –NoT_runcate switch is specified (separated by a space), the file is not cleared

    / L<Каталог>
    a directory of localized interface resources is specified (for example, "RU")

    / DisableStartupMessages
    Suppresses startup messages: “The database configuration does not match the saved configuration. Continue?"; “Your computer is not powerful enough to edit the configuration help. To edit the Help, you need to install Microsoft Internet Explorer 6.0 or higher. "; “Your computer's capabilities are not enough for editing html documents, including help topics. To edit html-documents, you need to install Microsoft Internet Explorer version 6.0 or higher. In this launch, editing html-documents will not be available. "

    / C<Строка текста>
    passing parameter to configuration

    C: \ 1CV8 \ BIN \ 1CV8.EXE ENTERPRISE / FDB

    The given command line means that the 1C: Enterprise 8.0 system will be launched in 1C: Enterprise mode, and the infobase is located in the \ DB subdirectory of the C: \ 1CV8 \ BIN directory.

    C: \ 1cv81bin \ 1cv8.exe enterprise / s Serv06 \ ZUP / L RU
    And this given command line means that the 1C: Enterprise 8.0 system will be launched in the "1C: Enterprise" mode, the address of the ZUP infobase stored on the 1C: Enterprise Serv06 server and the Russian interface

    The 1C program is incredibly popular for maintaining financial documents of almost any enterprise. The program has a huge number of functions and capabilities. Sometimes it is not so easy to deal with them. You can create multiple user accounts for which a separate database will be created. Each time you start, you need to select the desired account, database, and in some cases, specify other settings and parameters. If there are several users, then you can easily get confused and make a mistake when choosing. Even if you are not confused, over time, such a number of manipulations for a normal launch becomes boring.

    Launching 1C from the command line simplifies the work with the program.

    How can you simplify this procedure? The developers have provided for the launch of the 1C program from the command line. Do not be intimidated by this name, you will not need to memorize a bunch of combinations, and the command Windows string you won't need it either. It is enough just once to create the required number of shortcuts, register the necessary command line parameters in their properties, or create a special bat-file and write them in it.

    In this article, we will analyze in detail how to use this launch method, as well as how to specify all the parameters. In addition, we will share with you a list of the most important commands that will help you fine-tune the client.

    First, let's see what files are responsible for the launch and operation of the program, as well as the directory hard disk where they are stored. The main directory where 1C is installed is C: \ Program files \ 1CvXX \, where the numbers of the working version are indicated instead of XX. If the latest 8.3 is used, the folder will be named 1Cv83, if the previous ones are 1Cv82 or 1Cv81. Inside the directory there are other subversion directories. They already contain the bin folder with the main executable version file. It is not clear what the developer is guided by, but with each update, the installer creates new folders, eventually eating up a lot of free space on the hard drive. Next, find the Common folder, and in it the 1cestrart.exe file. It is he who launches the window for selecting the user and the database. This window, respectively, is a file 1cv8s.exe from a specific bin directory.

    After you select the database to work with, another file is launched, the name of which depends on the launch option - 1cv8.exe ( fat client) or 1cv8c.exe (thin client). We will tell you the difference between these options a little later. In addition, you can display the shortcuts you need to work and prescribe launch parameters in them, speeding up the process several times.

    Options for starting the 1C program

    Let's try to figure out what launch options the developer offered us. There are four of them, they differ in the principle of operation and the demands on the resources of the computer on which you work.

    • Fat client - until recently it was the only one existing option... It is the most demanding on the resources of the working machine, since all data processing is performed on the user's computer, which also stores all the files necessary for work. Does not depend on the presence of the Internet, but is tied to the hardware, does not represent the possibility of remote work.
    • Thin client - is a software shell for accessing the 1C server. It has a familiar menu interface and settings, but since all data processing is performed on the server, it is not at all demanding on the power of the equipment. The user is provided with limited functionality, it is possible to organize work both with a remote server via the Internet, and on the computer itself in a special software environment.
    • Web client - all you need is a web browser and Internet access. Accordingly, there is no connection to the computer and place of work. The load on the equipment is minimal, since all calculations take place on a remote server.
    • Configurator - special mode for fine tuning a program that only works when using a thick client.

    By far the most popular launch option is a thick client with a file database stored on the computer. Nevertheless, given the total aspiration for web services and cloud technologies, we can assume that the future lies precisely with the web version.

    It is worth noting that by default in the settings of the 1C program, automatic selection of the launch option is registered, so you do not need to think about it. However, if you need to use some specific option, you can create shortcuts on the desktop and write command line parameters in them, or use a bat file. Let's take a closer look at each method.

    Launch via a shortcut on the desktop

    Most in a simple way will use a shortcut on the desktop, in the properties of which command line parameters are specified. How to organize access in this way?

    1. Open up Windows explorer, go to the directory that contains the executable file you need and find the file itself with the exe extension. For example, C: \ Program files \ 1Cv83 \ bin \ 1cv8.exe to run in thick client mode.
    2. Click on it with the right mouse button and select "Create shortcut".
    3. After the system displays the message “Windows cannot create a shortcut in this folder. Put it on your desktop? " click "Yes".
    4. Find your shortcut on the desktop, right-click on it, select "Properties" - "Shortcut" tab - "Object" line.
    5. You will see an entry like this: “C: \ Program files \ 1Cv83 \ bin \ 1cv8.exe”. If you put the cursor there, then the contents of the line can be changed.
    6. At the end of the line, enter the command corresponding to your expectations, confirm the entry with the "Apply" buttons - OK.

    Running with a bat file

    An equally easy option for launching the program. The main difference is the registration of all data manually in a special text file... For some, this method will seem more convenient. How do I use it?

    1. Create the most common Text Document using standard Notepad.
    2. Give it a name in the format filename.bat, where bat is the file extension, and then save it to any folder on your hard drive.
    3. Copy the following commands into your document:

    @echo off
    cls
    start

    1. After start, enter the required command to start the program with the required parameters.
    2. Save the file and close it.
    3. To start 1C, double-click on the bat-file.

    Attention! For correct operation, it is desirable that the commands do not have Russian characters, in particular, in the file path or username. Otherwise, you should be careful with the choice of file encoding.

    Basic startup commands

    Since in different versions 1C command line parameters are different, let's look at samples for each of them. We will present it in the following sequence: decoding of each element and a sample of application.

    Version 7.7

    1cv7.exe MODE [/ M | / D ‹path› | / U ‹path› | / N ‹username› | / P ],

    where MODE is the specified mode in which the program client will run. It can take on the following values:

    • config - configurator for fine-tuning program functions, as well as programming some operations;
    • debug - a debugger for checking the health of some functions and operations;
    • enterprise — Normal mode of operation for performing day-to-day enterprise maintenance tasks.
    • monitor is a command that starts monitor mode.
    • / M - start exclusive access mode so that no one but you can enter the program. If you are the only user, then exclusive mode is automatically activated. To enter exclusive mode when working on the enterprise network, you need to have other users log out of the program. The mode is necessary for performing important operations with databases so that no third party intervenes.
    • / D is the folder where the database is stored. It is especially important if you are using a folder that is different from the one that the program selects by default.
    • / U - work folder user, provided that the program is used by several users.
    • / N - username to access the database and account.
    • / P - password for access to the account and database.

    Even more rarely used commands:

    • / T ‹path› - the path to the folder with temporary files, if you want them to be stored in a non-default folder.
    • / @ ‹FileName› - to select a batch launch file when working in the configurator mode.
    • / W - initialization of the web extension.
    • / L - program menu language other than Russian: ENG - English, UKR - Ukrainian

    Usage example: 1cv7 enterprise / Dc: \ 1c \ database / NIvanov / P753159,

    If you run the program with such commands, you will avoid displaying the user and database selection window, and you will not be prompted for a username and password.

    Version 8.2 and 8.3

    • DESIGNER - start in the configurator mode for programming functions and fine-tuning.
    • ENTERPRISE - starts the normal mode for serving the enterprise.
    • CREATEINFOBASE ‹ConnectionString ›] - create new base data, which will store all working information.
    • ConnectionString - the following parameters can be specified:
      • File - the folder of the database (for the file mode of operation).
      • Srvr - enterprise server address (for client-server operation). You can specify several addresses as follows: Srvr = "Server1, Server2" or Srvr = "Server1: 1741, Server2: 1741";
    • / AddInList [BaseName] - the name of the database that will be used to add to the list. If you skip this parameter, the database will not be added to the list, and if you do not write your name, it will be assigned automatically.
    • / UseTemplate - the database is created from a ready-made template, which is indicated in the name written in triangular brackets.
    • Ref is the name of the database stored on the program server.

    DBMS indicates the type of database used on the server:

    • MSSQLServer;
    • PostgreSQL;
    • IBMDB2;
    • OracleDatabase.

    For each type of database, you can register additional parameters:

    • Usr - login.
    • Pwd - password.
    • Locale - localization.

    When starting the program in normal mode or in the configurator mode, you can use the following command line parameters:

    • / @ ‹FileName› - select external file with the prescribed command line parameters.
    • / F - the path to the database in file mode.
    • / S ‹ComputerName \ BaseName› - the location of the base on the main computer in server mode.
    • / WS - link to connect to the web server.
    • / IBName ‹database name› - start the database with the specified name from the list of all available databases. If the names of several databases coincide, the program will generate an error.
    • / IBConnectionString - the address of the connection to the full database in the form in which it is used by the ConnectionString function described above.

    Using thin client you can apply the following parameters:

    • wsn - username to connect to the web server.
    • wsp is the password for connecting to the web server.
    • wspauto - enable automatic proxy settings.
    • wspsrv - proxy server address.
    • wspport is the proxy server port.
    • wspuser - login when working through a proxy server with the need for authorization. username for proxy with authorization.
    • wsppwd - password when working through a proxy server with the need for authorization. username for proxy with authorization.
    • / N - login specified in the configurator. Username as specified in the Configurator.
    • / P “Password” - the password of the user specified in the previous parameter. It can be omitted if the user does not have a password.
    • / WSN ‹name› - username for authentication on the web server.
    • / WSP 'password' - the password of the user whose name is specified in the / WSN parameter for authentication on the web server.
    • / WA- - prohibits the use of Windows authentication at startup.
    • / WA + - Force Windows Authentication at startup. If you do not write this parameter at all, the default is / WA +.
    • AppAutoCheckVersion - automatic selection of the required version of the 1C program for each version of the database.
    • / AppAutoCheckMode - automatic selection of the launch mode based on information from the database.
    • / UseHwLicenses +, / UseHwLicenses- - search for a local protection key.
    • / Debug - start the 1C program in debug mode.
    • / DebuggerURL - identification of the debugger to which the application should connect immediately after launch. Specifies the debugger URL (protocol, computer and port number) on which remote objects can be created in the debugger.
    • / RunShortcut ‹file name› - start the program from the file of the list of created databases.

    Batch Mode Configurator

    • / DumpIB ‹FileName› - dumping the database.
    • / DumpCfg ‹FileName› - saving settings to a separate file.
    • / DumpDBCfg ‹FileName› - saving database settings to a separate file.
    • / ConvertFiles ‹file name | directory› - batch conversion of files 1C version 8.x. For the procedure to be successful, the files must be writable, as well as the running configurator mode with an open configuration in which you will perform the conversion.

    For instance: 1cv8.exe /ConvertFilesd:/base/ExtProcessing.epf - file conversion,

    1cv8.exe / ConvertFilesd: / base - folder conversion.

    Examples of using the command line

    Launching 1C in the file mode of a thick client:

    "C: \ Program Files \ 1cv83 \ bin \ 1cv8.exe" ENTERPRISE / F "D: \ database \ User" / N "Admin" / P "12345 ′ ′

    Launching 1C in client-server mode:

    "C: \ Program Files \ 1cv83 \ bin \ 1cv8.exe" ENTERPRISE / S "server-base \ User" / N "Admin" / P "12345 ′ ′

    Conclusion

    We have considered the most basic commands to run 1C from the command line. By substituting commands, you can execute a wide variety of queries. In fact, there are many more of them, but a significant part of them, rather, are intended for specialists. technical support... Using the information from the article, you can perform all the actions yourself. Leave your questions in the comments.