Setting up the Enterprise Accounting configuration

1C, like any other program, requires the user to use only licensed versions. To confirm that the program has been officially purchased, use license keys 1C.

This article will discuss the types and features of 1C protection keys, as well as provide answers to frequently asked questions about working with them.

1C supports working with both software and hardware keys. Let's take a closer look at each of these types:

1C protection software key

1C software license- this is a file that is stored on a PC and is involved in the launch of 1C. If the file is activated with a PIN code, then 1C will be launched, otherwise (if it is launched for the first time) you will need to enter the PIN, which is included in the delivery package. The software key is tied to the computer hardware, so periodically, when replacing computer components, you have to reactivate the 1C license.

Conventionally, the 1C software license can be divided into 2 types:

  • single-user,
  • multi-user.

Single-user license installed on one PC and allows you to use the 1C platform. It is worth noting that the number of configurations and information bases software key does not limit.

Multi-user license most often installed on a server (1C:Enterprise, terminal server, WEB server). When a 1C client accesses a 1C server, the software itself monitors the number of free licenses and allows (or does not allow, if the number of licenses is exhausted) to work with 1C. It is worth noting that a multi-user license for up to 50 users can be activated not only on the server as a general license, it can be activated on 50 different client computers as 50 single-user licenses. But if at least one license from a multi-user set is activated as a single-user license, then further use of the licenses as a “set” is no longer possible.

Hardware protection key 1C

A more reliable, but at the same time more expensive way to protect 1C are hardware keys. Hardware security keys (HASP key) look like a flash drive and mark 1C as having passed licensing. In this case, unlike software license,The PIN is stored on HASP and not in a file on the computer/server.

There are 4 types of hardware keys, each with a distinctive color and marking:

  • Key for one user (local). The key is blue and marked H4 M1 ORGL8. This key is supplied with products that have a license for one personal computer.
  • Network key. The key is red. The HASP key is inserted into one computer and is visible to all computers on the network. Marked as NETXX ORGL8.., where XX is the number of licenses. There are varieties for 5, 10, 20, 50, 100, 300, 500 licenses.
  • Server key for 32-bit server. It is purple in color and marked ENSR8. Always comes with a server license.
  • Server key for a 64-bit server. Has green and EN8SA marking. Can also work with 32-bit servers.

!!! It is worth emphasizing that 1C specialists do not recommend using a local key and a network key on the same machine. When 1C is launched, the local key will be identified, and the network key will not be used, while all other network users will not be able to “see” the network key and, as a result, will not be able to work in 1C.

1C license manager

When working with a multi-user license, it is necessary for 1C to know about the presence of such a license on the network. The 1C License Manager is responsible for this ( Hasp License Manager). 1C license manager is optional software(included in the package), without which the multi-user license will not work correctly.

Answers to frequently asked questions about 1C protection keys:

No. 1. 1C does not see the license

In the case of using hardware keys, if 1C does not see licenses, first of all you need to make sure that the indicator on the HASP key is blinking. This is an indication that the device is detected and the HASP key driver is installed. If the light does not light, try connecting the flash drive key to another USB port, or contact system administrator, the user may not have sufficient access rights to install the driver.

Also, first of all, make sure that the key of the required series is connected to the computer. remember that keys can block each other.

No. 2. The HASP security key driver is installed with an error.

  1. Possibly incompatible operating system and the key driver. Try downloading more new version drivers.
  2. Driver files may be blocked due to being occupied by another process. Try restarting your computer and installing the driver immediately after loading. Or use the console version of the installation utility with command line parameters: hinstall -i -kp

No. 3. Error: HASP not Found (-3), (Error 7), (H0007)

HASP on the network runs on port 475. Make sure that on the computer with the key, on the computer with running application and port 475 is not blocked on the network. It may be blocked by a firewall or antivirus.

No. 4. HASP Device Driver not installed (-100)

Common Windows error XP. The protection driver loads slower than the protection server from startup. Instead of the protection server, use the LMSETUP License Manager, which is installed, please note, as a Windows Service!

In addition, let’s say that when working with 1C, two or more license managers can function simultaneously, but to prevent errors, each manager must be assigned its own unique name. To do this, use the nhsrv.ini file; you need to change the value of the NHS_SERVERNAMES parameter in the NHS_SERVER section. Moreover, it is necessary to communicate these names to each copy running program. To do this, use nethasp.ini: in the NH_SERVER_ADDR parameter indicate the IP addresses of the servers, in the NH_SERVER_NAME parameter indicate their names in the same order in which the addresses were specified.

If you still have questions about choosing, setting up, purchasing software or hardware, you can always contact our specialists for advice

At the request of our regular visitor to the site, we will publish a short article on how to install and configure the HASP driver emulator to run 1C 8.2 for Windows x64.
We will also analyze the installation and configuration of 1C 8.2 configuration with demo data.

Installation and configuration of 1C 8.2 HASP driver emulator for Windows x64

Operation is guaranteed with a completely clean licensed Windows system ( Windows Vista x64, Windows Server 2008 x64, Windows 7 x64, Windows Server 2008 R2 x64 including with Service Pack 1 installed)
Perform installation under local administrator!

1) Remove the old license manager and HASP driver (Control Panel -> Programs and Features). We also remove all old emulators and platform patches.
2) Disable User Account Control. Start -> Control Panel -> Change User Account Control settings. Set the value to “Never notify” (slider down).
3) Installation of 1C (platform) with the HASP driver or Installation of the HASP driver version with x64 support:

Download HASP Driver with x64 support:

4) Add dumps (the registry branch with dumps has changed) - “Dumps” folder, run and add the file to the registry "v8 50 user.reg" For workstation, for the server you need to add all files to folder "Dumps"- archive for downloading at the bottom of the article.

5) Launch install_sertif.cmd(installation of personal certificate and enabling test Windows mode ) if you don't want to press F8 every time you start it.

In this case, your OS should boot in test mode - if this does not happen, then when rebooting, you need to press the F8 button and select Test mode with the ability to install drivers with unsigned certificates. The test version is used to install device drivers that are not signed with a certificate into the system. The certificate is issued by Microsoft after the corresponding driver is sent by the device (hardware) manufacturer for testing to a Microsoft laboratory. The absurdity is that no one will issue a certificate for the emulator driver and, accordingly, it is impossible to avoid the test version.

Check: in the lower right corner of the worker Windows desktop must be written in white letters "Test version" Windows 7 Build ???
If this message is not present, then, alternatively, you did not enable test mode, so step 6 may not pass.
You can run the command bcdedit.exe /set TESTSIGNING ON in command line and reboot.

You also need to repeat removing all patches and HASP emulators found in the system and rerun step 5.
Test Mode may not turn on if Windows is already in another mode, such as Protected Mode.
Some Windows activators, put the system into protected mode to bypass the activation mechanism.
In this case, you need to remove this activator and/or update the activator and/or purchase a licensed product.

Don't forget to disable your antivirus; its components often block driver installation.

7) Install the driver
Control Panel -> Add Hardware -> (Control Panel -> Device Manager)
Add a new hardware device -> (Place the cursor on any of the device classes -> Action ->
Install old device ->)
Install the hardware that I manually select from a list -> (installation of equipment selected from
list manually ->)
Show all Devices -> (Show all devices ->)
Have disk -> (Install from disk ->)
Browse -> (Browse ->) path to the directory with files vusbbus.inf, vusbbus.cat, vusbbus.sys

Answer “Yes” when prompted to continue installing unsigned drivers.

8) Device Manager -> System devices should appear « Virtual USB Bus Enumerator"
(Device Manager -> System Devices)

Attention. After installing the “Virtual Usb Bus Enumerator” driver, in “ USB controllers» additional equipment will appear
"Aladdin HASP key" or analogue "SafeNet key"
"Aladdin USB key"
or after a reboot or after clicking Action -> Update hardware configuration

Examination. “Virtual Usb Bus Enumerator” should not appear on the device icon exclamation mark. The device should work normally.

9) Installing HASP LM driver (ONLY for installation on the Windows Server platform). In the archive - at the bottom of the article.

9) To disable the display of messages on the desktop “Test version” you must install "RemoveWatermarkX64.exe". In the archive - at the bottom of the article.

Download the archive with the HASP driver emulator for installing 1C 8.2 on Windows x64:

It is also advisable to prohibit the 1C platform from accessing the Internet (we use a Firewall or a third-party firewall).
That's all 1C Enterprise 8.2 is installed and working.

Installation. Setting up 1C 8.2 configurations

This detailed instructions By installing 1C configuration and creating a 1C database (from the installed configuration). Don't forget that you first need to install the 1C platform. Installing 1C configuration on a computer. Creating a 1C database from the configuration. Creating a 1C database from CF. Creating a 1C database from DT.

What needs to be done to install the 1C configuration?

Configuration 1C- this is a template. Based on this template, a 1C database is created. The number of 1C databases based on one 1C configuration template is unlimited.

Thus, the essence of setting up a 1C configuration is creating a database.

You can create a database in the following ways:

— Install a configuration (template) on your computer and create one based on it

— Create an empty database and load CF into it

— Create an empty database and load DT into it

— Restore the 1C SQL database backup to another database and connect it to the 1C server.

CF and DT are downloading a configuration from an existing database. They differ from each other in that DT includes data, while CF does not (contains only configuration information).

Installing the 1C configuration from the distribution kit on the computer

The configuration distribution package is distributed on disk (select the Install menu item to install) or as a self-extracting archive via the Internet (unpack it anywhere and click setup.exe).

Installing a 1C configuration distribution kit asks only one question - the installation directory. By default, the 1C configuration is installed in the templates directory.
This is a standard directory. For 8.1 it is usually located in “C:\Program Files\1cv81\tmplts\”, for 8.2 in “C:\Users\UserName\AppData\Roaming\1C\1Cv82\tmplts\”.
Change the directory to yours:

As a result of installation, a folder with the installed configuration will appear in the tmplts directory. Inside this folder are folders of installed configuration templates. They contain documentation and “additional things”. For the structure of the tmplts folder and a description of the files in the configuration distribution, see the end of the article.

Creating a 1C database from the installed configuration (file version)

The configuration is stored in a directory on disk (the file version, which is what we are considering).

It is necessary to select a location on the disk where we will create the configuration, for example “E:\My_docs\1C\baza\”. Let's go or create this folder and create a database folder in it, for example: “e:\My_docs\1C\baza\torgovlai-dla-fop”.
Let's launch 1C. In the database selection window, click the button Add.

Select “Create a new information base" and click "Next".

If you installed a configuration (one or more) from the distribution kit, now you will see a list of installed configurations. The following options are available in each configuration:
— Configuration name/version
— Configuration name (demo)/version
The first option is a clean empty database. The second option is a database with demo data for training. We choose the second option (place the cursor on the version number).

Enter the name of the database, it can be anything you understand. This name will be displayed in the list of databases when logging into 1C. For example, “Trade for private enterprises of Ukraine (DEMO)”

You need to select a database location. We are installing the file option, so we select “On this computer...”. When you install the client-server option, select “On the 1C server.” It is necessary to select the same directory that we prepared for the database. Indicated earlier when installing 1C. In our case it is: e:\My_docs\1C\baza\torgovlai-dla-fop

After this, we leave the installation step unchanged:


Select our Demo configuration and open it.



"Configurator"


We answer positively to question 1C. Converts versions. Upon completion you will receive a notification:


Let's launch the configuration and get to work.

Tmplts folder structure reminder

1) folder “1C” – 1C company configuration templates
2) folder “Configuration name” – the English name of the configuration (Accounting-Accounting, Trade-Trade Management, Hrm-Salaries and Personnel Management)
3) “Version” folder – configuration version
4) Configuration template folders and files.
For example, the path to the “Trade Management” configuration template version 10.3.9.4:
C:\Program Files\1cv81\tmplts\1c\trade\10_3_9_4\

1) Readme.txt – contents of the directory, what is where
2) HTML files – various descriptions and help for using configurations
3) 1cv8.cf - it is in this file that the 1C configuration is stored
4) 1Cv8.dt – this file stores a database archive based on this configuration, usually a demo database; the file contains both configuration and data
5) 1cv8.cfu – configuration update file, used to migrate from one configuration version to another
6) TTF files – font files, used for example for printing barcodes, please note that these fonts need to be added to the system if they are in the configuration distribution
7) XML files – often various classifiers are supplied with the configuration, we will consider loading them into the database in future releases, please note that these files should also be loaded into the database after it has stopped (for example, okp.xml)
8) ExtReps catalog – external reports and processing used for accounting, often this is how reports are supplied that change frequently, for example various printed forms
9) TradeWareEpf catalog - processing that is used to connect equipment, we will consider connection in future issues
10) Conv_ХХХ directories – such directories store “conversion rules”, the rules by which you can upload data from one database to another

That's all, if you want to “thank” us, you have this opportunity: on the right there are options for donations for the development of the portal. Or share the article on your social media using the services below.

Technology for converting code 77 to 80.

Unfortunately, the developers did not take the path of backward compatibility (although they could have). Therefore, we will go this way! ; -)

1C only allows you to convert a 77 to 80 configuration, while database data, forms, layouts, and application objects are transferred, but the module code is not converted because it is incompatible.

1C could support old and new code so that important areas could be gradually rewritten to 80, leaving old and unimportant ones to 77. But, alas.

Fortunately, in a conversation with Anatoly Fedkov, I came up with an idea that would save coders 77, which I am sharing with you.

It consists of emulating code 77 with built-in tools 80. Fortunately, 1C mainly operates with objects, so there is a very simple way to switch from 77 to 80, which few people have thought about. This method will help you do 80% of the code conversion without additional coding.


Object emulation

It is necessary to replace all created objects 77 with emulator objects that emulate the work of 77. In this case, changes to the configuration are minimal.

Such emulator objects have methods and properties that are completely identical to the properties of objects 77. Unfortunately, in 80 you cannot set a trigger to change an object’s property, so in some cases (when setting a property has a side effect), you will need to work with your hands. But such cases are few.

The point is that objects 77 are replaced by corresponding processing.
For example, the object " AccountingResults» 77 is replaced by the object Processing.B accountingResults77.

Fortunately, the “CreateObject” function in 80 is not occupied, so you can put interceptors on it, which will create an emulator object corresponding to it instead of the object:

Function CreateObject(ObjectType) Export If Lev("ObjectType",10) = "Directory" Then Processing.Directory.Create(ObjectType); OtherwiseIf Lev("ObjectType",8) = "Document" Then Process.Document.Create(ObjectType); Else Return Processing[ObjectType].Create(); endIf; EndFunction


It may be more convenient to emulate objects 77 not with processing, but with forms, but this will prevent us from taking advantage of the three-tier architecture, but forms have DataChangeHandler, responding to changes in form data and most likely you can dynamically control the composition of forms. This question needs to be explored.

It might be more convenient to emulate 77 objects via OLE object, which will contain the necessary emulator processing, written in language 77, and additionally catch changing and reading properties, as well as dynamically change the composition of object properties.

But for now we only have processing at our disposal.

Application object emulators

It is better, of course, to create an emulator object for each type of application object than to implement all the functionality 77 in each type of application object 80.
Those. for example, it is better to create a processing containing the attribute "
NumberDoc", than to create details for each document "NumberDoc».

Unfortunately, processing does not know how to handle an event when a property is accessed that it does not have. Therefore, it is more reliable to replace all calls to the details of object 77 through , but in principle, you can do without this if when calling method 77 CurrentObjectand others similar to it, the properties of an object are read into memory and are available for reading.

In this case, the emulator object must contain all possible properties of all objects.

Read about another emulation method in the “Smart Point” section.

Smart point

Some shortcomings of emulators can be resolved if you correctly process the source code 77 using regular expressions. As you know, in 80 you can unload all modules into files, process them, and then load them back.
It is best to mark each line 77 with a comment //77 at the end, so as not to be confused with the code rewritten to 80. Then code processing can be performed multiple times.

So, “smart point”. The point is to find all accesses to the properties of an object through a dot and replace them with a call method GetAttribute/ SetAttributewhich should set the property.

Replacement expression to read the property:
A period followed by an identifier followed by a non-equal sign - replace the period and identifier with . GetAttribute(Identifier);

Replacement expression to set a property:
A period, followed by an identifier, followed by an equal sign, and then some expression ending with a semicolon, the words " EndIf», « End of the Cycle", "EndFunction", "End of Procedure"etc. - replace the dot, identifier, equal sign and expression with . SetAttribute(Identifier, Expression).

In this case, access to the properties of the emulated object will be carried out only through method calls GetAttribute/ SetAttribute, which will allow flexible control over the reading of object properties.

If you are not very good with regular expressions, you can hire a student who will process these points himself (you can also process them in database 77), so that later it will be easier to move on.

The amount of work can be estimated by running a global search for the symbol "." according to the configuration and pay the student purely for the number of lines. The work is mechanical.

About the development of the method

Imagine the work of a million lemmings translating self-written configurations from 77 to 80 turned out to be slavish, because it was possible to go another way. Fortunately, this information will be useful to other programmers moving from 77 to 80.

Over time, when the configuration transferred in a similar way from 77 to 80 works, you can transfer it in parts from emulator objects to objects 80, as work progresses.

Contexts

It is worth noting that when displaying a report section (as well as calculating the Template function), all variables visible in the execution context are available. For 80 they need to be driven into parameters, preferably into a structure.

Forms

Forms 77 could contain calculated fields for labels and value table cells.
In forms 80, all these calculations need to be transferred to the eventUpdateDisplay.

Periodic directory details

For simplicity, periodic details can be stored in one information register with a periodicity up to date and a dimension structure of Directory (link to the directory), Attribute (identifier or enumeration value (better)) and resource Value of an arbitrary type.
Considering that documents can establish the details of the periodic details of the directory and, when removed from processing, these details can be deleted, it is better to create a register that is not subordinate to the registrar, and the attribute of this register is “Document”. When deregistering a document, delete all entries in this register where the “Document” attribute points to this document.

Constants

The easiest way is to create one information register for each constant with a specified frequency.
In this case, universal processing is possible to transfer constants for a given date to the corresponding information register.
Keyword Constant. needs to be replaced with a challenge CreateObject("Constant").
And the implementation of the Constant class in processing Constant77 is at your discretion.
Example:

//Source code: Constant.MainWarehouse Constant.Manager.Get(’10/12/1980’); //Change to: CreateObject("Constant").Get("MainWarehouse"); CreateObject("Constant"). Get("Manager", '19801012');

Restrictions

In 1C8 processing, you cannot use a function named Execute, so before starting the emulator you will need to perform a global replacement . Execute on ._ Execute.
But in my opinion, in 1C7 there are no objects with the Execute method. ;-)

Another tricky method
P
While the article was being written, I came up with another cunning method of dealing with the limitations of 1C. To avoid having to look for points in the code, you can do it differently.
Let's look at the example of constants.
Suppose a list of seven constants is stored in an array in a global variable
glConstants77 .
Let's say a constant emulator with the Get and Set methods is being processed by Emulator77_Constant.
Then we create a global variable Constant.
Next:

Constant = New Structure(); For Each El From lConstant77 Loop Constant.Insert(El, Processing.Emulator77_Constant.Create()); EndCycle;

That's it, no code changes. The constants source code works.
The code for reference books and documents without dots will work similarly.
It is enough just to attach a handler to each attribute.
A good approach, in fact, the source code does not change at all.

How to work