In July last year, I already posted an article. Nevertheless, quite often I am asked in comments to tell me how to install 1C 8.

Given the popularity of this topic among site visitors, I decided to publish an updated article about how to install 1C 8(for the 1C:Enterprise 8.2 platform). This article will discuss installing the platform, a key emulator (for those who decided to go against the law and not buy a license for 1C company products) and installing a clean Enterprise Accounting configuration.

How to install 1C 8

To get started, you will need the 1C platform installation package. It can be taken on the ITS disk or downloaded from the Polygon. In my example this will be Platform 8.2.15.294 (x32). For 8.3 everything is done exactly the same.

Platform installation

After unpacking the archive, you need to run the setup.exe file from the folder into which the platform installation files were unpacked.

On the welcome page that opens, you need to click the button "Next".

On the next page, the installer will prompt you to select the installation components that you may need.

Among them will be:

  • 1C:Enterprise
  • 1C:Enterprise - Thin client
  • 1C:Enterprise - Thick client, file version
  • Server 1C:Enterprise
  • Web server extension modules
  • Administration of the 1C:Enterprise server
  • Interfaces on various languages
  • Storage server configuration 1C:Enterprise
  • Converter IB 1C:Enterprise 7.7




Having selected the necessary components, you need to press the button "Next" to go to the next installation page, where you need to select the required interface language, which will be used by default. In my case it is Russian. After selecting, press the button again "Next".

The following screen will appear if you selected 1C:Enterprise Server in the installation components. On it you will need the settings with which the 1C server will work.

Before completing the installation process, the program will prompt you to install the protection driver. Those who are about to break license agreement 1C companies, using a security key emulator, can uncheck this box and refuse to install the driver.

After the installation is complete, the program will report the result and offer to read the Readme file.

Working with the 1C key emulator

The emulator (or rather the patch) can be downloaded there.

If you installed the 1C server, then you need to go to services and stop the 1C Server Agent.

After stopping the service (or if you did not install it), you need to run the patch and specify the path to the backbas.dll file, which is located in the directory with 1C installed.

If the file is successfully processed, the program will notify you about this. If the inscriptions Success! it didn’t, it means that at some stage you made a mistake or you have a version of the platform that is not supported by the patcher.

After this procedure, you can start the 1C Server Agent service.

Setting up the Enterprise Accounting configuration

And again, first you need to acquire the Accounting distribution kit on the ITS disk or in the “polygon” section, the link to which I already gave above.

Be sure to check that the distribution you are downloading does not have (upd). These letters mark the update files and you will not be able to create a database from them!

After unpacking the archive, run setup.exe and press the button "Next".


On the next page you need to indicate the path to install the Enterprise Accounting configuration templates (or other configuration that you install). I strongly recommend leaving the default path in order to avoid further “hemorrhoids” and subsequent questions like “...why do I have...”

By default, templates are copied to the user profile. For Wimdows 7 the path will be similar to the one in the screenshot below.

Creating a database from a template

To create a database, you need to launch 1C:Enterprise from the menu "Start" or from the Desktop, and press the button "Add".

In the window that opens, you need to select the item "Creation of a new information base" and press the button "Next".

In the next window, select the configuration you will install.

Installation option, with additional word (demo) in the name of the configuration, will install a ready-made database with test data, which can be used to learn how to work with the configuration.

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 the old and new code, so that you can gradually rewrite important sections 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 handled correctly 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 global search character "." 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.

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 launching 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 The 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 one, 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. It is green in color and marked EN8SA. 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 parameters command line: 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 of the 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

Emulator is a program that simulates the operation of various physical devices or other programs.

For example, virtual disks, emulators of game consoles, games, etc. This article discusses the HASP security key emulator.

HASP– hardware software package protection of software from illegal (unauthorized) use and distribution.

Keys are available for various operating systems - Windows, Linux, Android and 32- and 64-bit computers.

The system was developed by Aladdin KS, whose protection includes:

– electronic key (USB key fob);
– special software for binding to a key, protecting programs and data.

There are different versions of the HASP key:

– USB keychain;
– LPT key;
– PCMCIA card, internal map PCI.

The most common type is the USB keychain. Currently, several key options are used:

1) HASP 4 (the first version of protection), HASP HL ​​(HardLock - a modern version) - these are hardware keys.

2) HASP SL (Soft Lock) – software key. This key is more convenient for distributing applications, but has a lower level of security than HL.

3) HASP SRM is a combined solution, it has a choice of what to use: a hardware HL or a software SL key.

HASP protection is used by such software packages as 1C, Consultant Plus. The order of protection is approximately this. The key is connected to a specific port on the computer. A special protection driver is installed.

The protected program sends protection information through it. If the key answer is correct, the program continues to work, otherwise: demo mode or just stop.

Key emulation is used in following cases:

– hacking program protection (hacking, illegal use - unfortunately.);
– unstable operation of HASP keys;
– failure or loss of the key;
– inconvenience of using the key on different computers.

Such emulators are developed for users of licensed software in order to facilitate their work (no key fob is needed), which is not a violation of the law.

This means that to install any emulator, you must have licensed version BY.

If for some reason you need a key emulator, you need to keep the following in mind - emulator options, it depends on:

– number of program users;
– program version – network or for local users;
– for which server do you need an emulator – Server 2003, 2008, etc.

Many emulation programs have been created, among them the Sable complex. Below are two specific examples.

Installing the Hasp HL emulator

Additional information:

www.xaker.name/forvb/showthread.php?t=20555&page=11
exctcryptor.ucoz.ru/haspharddong2007.zip

Unpack and run HASPHL2007.exe

Drivers and the original connection key must be installed.

IN DRIVER program Click INSTALL to install the driver.

Run the program edgehasp.exe– key generation. Enter the resulting key into the “EMULATOR” tab. Click “StartService”.

Launch the protected program, check its operation, then, if everything works, open the “DUMPER” window. Passwords are displayed in the window. To create a copy, click “DUMP”. The result is a file of type .dmp.

Run the EDGEHASP.EXE program to convert the file.

Open the DONGLES file in the HASP/Hardlock Emulator window and specify the file name.

Clear dump – CLEAN button.

You can use it. 🙂

Installing the Sable emulator

Information can be found at:

www.emus2.narod.ru/emulyator-sable.html

Launch Sable and wait for the reboot.

Remove emulator shortcut – C:\Documents Settings\All users\StartMenu\Programs\Startup

Launch C:\ProgramFiles\SABLE\. Launch delnt.bat– removal of Hasp from the registry.

Install Hasp emulator - C:\ProgramFiles\SABLE– run instnt.bat.

Launch startnt.bat. PU – system – Equipment - remote control

Menu View-ShowHiddenDevice – Click NonPlag... -Scan for hardware...

Properties (Properties – hasp Automatic.) Ok.

Copy patch77. exe from C:\ProgramFiles\sable to the 1C folder.

Run patch77.exe /F1cv7.exe.

Note. The instructions given are examples that need to be followed in a real situation.

Here you can Download HASP emulator completely free.

That's all I have for today follow the blog By email. I look forward to your feedback in the comments. Bye!