Running 1C from the command line

The 1C program is incredibly popular for keeping financial records of almost any enterprise. The program has a huge number of features and capabilities. Sometimes they are not so easy to understand. 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 wrong choice. Even if you are not confused, over time, such a number of manipulations for a normal launch will get annoying.

Running 1C from the command line makes it easier to work with the program.

How to simplify this procedure? The developers have provided the launch of the program 1C from the command line. Do not be afraid of this name, you will not need to remember a bunch of combinations, and you will not need the Windows command line either. You only need to create the required number of shortcuts once, set the necessary command line parameters in their properties, or create a special bat-file and register them in it.

In this article we will discuss in detail how to use this method of launch, 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 in fine-tuning the client.

What files are responsible for running the program

To begin, let's see which files are responsible for starting and running the program, as well as the directory of the hard disk where they are stored. The main directory where 1C - C: \ Program files \ 1CvXX \ is installed, where instead of XX the numbers of the working version are indicated. If the latest 8.3 is used, the folder will be called 1Cv83, if the previous ones are 1Cv82 or 1Cv81. Inside the catalog are other directories with sub-versions. Already in them is the bin folder with the main executable file version. 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 disk. Next, find the Common folder, and in it the file 1cestrart.exe. It is he who launches the user and database selection window. This window, respectively, is a 1cv8s.exe file from a specific bin directory.

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

Variants of starting the 1C program

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

  • Fat client - until recently it was the only existing option. It is the most demanding of the resources of the working machine, since all data processing is performed on the user's computer, and all the necessary files for work are stored on it. It does not depend on the availability 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 and settings interface, but since all data processing is performed on the server, it is completely not picky about 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 - you only need a web browser and access to the Internet. Accordingly, there is no binding to the computer and place of work. The load on the equipment is minimal, since all calculations occur on a remote server.
  • Configurator - a special mode for fine-tuning the program, which works only when using a thick client.

Today, the most popular startup option is a thick client with a file database stored on a computer. Nevertheless, given the total commitment to web services and cloud technologies, we can assume that the future is for the web version.

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

Run via desktop shortcut

The easiest way is to use the shortcut on the desktop, in the properties of which are specified command line parameters. How to organize access in this way?

  1. Open 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 fat 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 the desktop? ”Click“ Yes ”.
  4. On the desktop, find your shortcut, right-click on it, select “Properties” - “Label” tab - “Object” line.
  5. You will see the following entry: “C: \ Program files \ 1Cv83 \ bin \ 1cv8.exe”. If you put the cursor there, the contents of the line can be changed.
  6. At the end of the line, enter the appropriate command for your expectations, confirm the input with the buttons “Apply” - OK.

Run with bat file

At least an easy option to run 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 to use it?

  1. Create the most plain text document with a standard Notepad.
  2. Think of a name in the format file_name.bat, where bat is the file extension, and then save it in any folder on your hard drive.
  3. Copy the following commands to the document:

@echo off

cls

start

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

Attention! For correct work, it is desirable that the teams do not have Russian characters, in particular, in the file path or user name. Otherwise, you should carefully consider the choice of file encoding.

Basic startup commands

Since the command line parameters differ in different versions of 1C, consider the samples for each of them. We will present in the following sequence: deciphering each element and sample application.

Version 7.7

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

where MODE is the specified mode in which the program client will be launched. It may take the following values:

  • config - configurator, for fine-tuning the functions of the program, as well as programming some operations;
  • debug - a debugger to check the performance of certain functions and operations;
  • enterprise - the usual mode of operation to perform daily tasks for the maintenance of the enterprise.
  • monitor - the command that starts the monitor mode.

Next, you should clarify some startup parameters:

  • / M - launching exclusive access mode so that no one but you can enter the program. If you are the only user, then exclusive mode is activated automatically. To enter the exclusive mode when working on the enterprise network, it is necessary that other users log off from the program. The mode is necessary for performing important operations with databases so that no third-party intervenes.
  • / D - the folder in which the database is stored. It is especially important if a folder is used that is different from the one that the program chooses by default.
  • / U - user's working folder, 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.

More rarely used commands:

  • / T ‹path› - path to the folder with temporary files if you want them to be stored in a folder other than the default.
  • / @ ‹FileName› - to select a batch file when working in the configurator mode.
  • / W - initializes 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 - run in configurator mode for programming functions and fine-tuning.
  • ENTERPRISE - start the normal mode for the maintenance of the enterprise.
  • CREATEINFOBASE ‹StringConnections› [/ AddInList [NameBase]] [/ UseTemplate ‹name of the template file›] - creating a new database in which all working information will be stored.
  • Connection string - these parameters can be specified:
    • File - database folder (with the file version of the work).
    • Srvr - the address of the enterprise server (in the client-server version of the work). You can specify several addresses as follows: Srvr = ”Server1, Server2” or Srvr = ”Server1: 1741, Server2: 1741”;
  • / AddInList [DatabaseName] - the name of the database that will be used to add to the list. If you skip this parameter, the base will not be added to the list, and if you do not register your name, it will be assigned automatically.
  • / UseTemplate - the database is created from a ready-made template, which is indicated in the name given in the triangular brackets.
  • Ref - 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 specify additional parameters:

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

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

  • / @ ‹FileName› - selects an external file with the specified command line parameters.
  • / F ‹PathBases› - path to the database in the file mode of operation.
  • / S ‹ComputerName \ NameBase› - location of the database on the host computer during server operation.
  • / WS - link to connect to the web server.
  • / IBName ‹database name› starts the database with the specified name from the list of all available databases. If the names of several bases match, the program will generate an error.
  • / IBConnectionString is the address of the connection to the full database as used by the Connection String function described above.

When using a thin client, you can apply the following parameters:

  • wsn - user login to connect to the web server.
  • wsp is the password to connect to the web server.
  • wspauto - enable automatic proxy settings.
  • wspsrv - proxy server address.
  • wspport - proxy 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› - the login specified in the configurator. User name as defined in the Configurator.
  • / P ‹Password› - password of the user specified in the previous parameter. It can be omitted if the user does not have a password.
  • / WSN ‹name› is the username for authentication on the web server.
  • / WSP ‹password› - 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 the use of Windows authentication at startup. If you do not write this parameter at all, the default is / WA +.
  • AppAutoCheckVersion - automatic selection for each version of the database of the desired version of the program 1C.
  • / AppAutoCheckMode - automatic selection of the launch mode based on information from the database.
  • / UseHwLicenses +, / UseHwLicenses- —search a local security key.
  • / Debug - run 1C program in debug mode.
  • / DebuggerURL - identification of the debugger to which the application should be connected 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.

Configurator batch mode

  • / DumpIB ‹FileName› - unload the database.
  • / RestoreIB ‹FileName› - load the database.
  • / DumpCfg ‹FileName› - saves the settings to a separate file.
  • / DumpDBCfg ‹FileName› - saves the database settings to a separate file.
  • / LoadCfg ‹FileName› - load settings from an external file.
  • / ConvertFiles ‹file name | directory› - batch conversion of 1C version 8.x files. For the procedure to be successful, the files must be available for writing, as well as the running mode of the configurator with an open configuration in which you will perform the conversion.

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

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

Command Line Examples

Run 1C in thick client file mode:

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

Running 1C in client-server mode:

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

Conclusion

We considered the most basic commands for running 1C from the command line. Substituting commands, you can perform a variety of requests. In fact, there are many more, but a significant part of them are most likely intended for technical support specialists. Using the information from the article, you can perform all the actions yourself. Leave your questions in the comments.