Contacts

Basics of working with the Windows registry. Making changes to the registry using a REG file Creating registry files

Reg file structure
Chebotarev Igor

Knowledge of the Windows registry will not be complete without the ability to write a reg file. Let's start with what it is. A reg file is a file that has a specific structure and contains information that can be imported into the registry. If work with the registry editor has been blocked (you can read how to do this in the article), then the easiest way to edit the registry is to create and import a reg file (of course, you can go into DOS, into protected mode, use other programs, but that’s all much more difficult, and most importantly longer).
Reg files have certain structural requirements. Let's start with the fact that in the first line of the file you must enter
REGEDIT4
Please note that the letters must be large. Apart from this, there should be nothing in the first line. There MUST be an empty line after this text. Then, the registry section is indicated in which you need to register or change some parameters. The section title must be enclosed in square brackets [...]. Below are the parameters that need to be added, one parameter per line. If you need to make changes in several sections, then you should leave one blank line between the last parameter of the previous section and the name of the next section. Might be a little confusing, but here's what it should look like:
REGEDIT4
"param1"="znachenie1"
"param2"="znachenei2"
"param3"="znachenie3"
"param_1"="znachenie_1"
The last line in the file must be BLANK. Once you have created such a file, simply run it as a regular program, you will be prompted to make changes to the registry, and after a positive answer, the information from the file will be imported. Windows will report the import results in the window that appears after this.
Now a few words about the parameters that can be added. As you may have noticed, the example above adds parameters using lines like "param1"="znachenie1". Those. This adds a STRING parameter with the name "param1" and the value "znachenie1". But there are also binary and DWORD parameters. The recording format for adding them is slightly different. For DWORD type parameters the string is used
"param"=dword:XXXXXXXX
Here "param" is the name of the parameter, dword - indicates the type of this parameter (the letters must be small!) and after the colon there is a value of eight digits in hexadecimal (!) format. However, most DWORD parameters have a value of either 0 or 1, which means you should write either 00000000 or 00000001 instead of XXXXXXXXX. Spaces are not allowed in the line.
To add a binary parameter, the recording format is slightly different:
"param"=hex:XX,XX,XX,....
Now I will decipher this line. Well, everything is clear with the name of the parameter, after the "=" sign there is a hex, i.e. indicates that this will be a binary parameter, followed by hexadecimal numbers separated by a comma. For example, if you need to add a binary parameter equal to "be 00 00 00", then you write the line
"param"=hex:be,00,00,00
There are "Default" parameters in the registry. To assign them some value through a reg file, you need to add the following line:
@="znachenie"
Here the @ symbol indicates that we are assigning the value of the parameter to "Default". Note that it is not enclosed in quotation marks.
Now I will give an example of a simple reg file that registers a site in the registry that sets the home page in Internet Explorer:
REGEDIT4
"Start Page" = "http://www.site/"
In my opinion, everything is very simple and clear. But reg files have one peculiarity: they cannot be used to delete parameters in the registry, although you can delete an entire section. To remove a section from the registry, place the “-” symbol in square brackets before its name. This is what it looks like:
[-HKEY_LOCAL_MACHINE\Software\QuickSoft\QuickStart]
Thanks to this entry, the "QuickStart" subsection from the "QuickSoft" section will be removed with all its contents. However, what about the parameters? After all, they cannot be deleted. Thus, setting restrictions on access to various Windows shell settings, as described in the article, is done using DWORD type parameters. In this case, if the parameter value is 1 (00000001), then the limitation is enabled, and if it is 0 (00000000), then the limitation is disabled. Thus, it is not necessary to delete the parameters; it is enough to simply assign them values ​​equal to zero.
Note regarding deletion made by Nikolai Basmanov:
Using REG files you can delete parameters. Syntax:
REGEDIT4
"xxx"=-

Here, perhaps, is all the basic information on the structure of reg files. I also recommend trying to export some sections from the registry (not very large with small nesting) in order to once again look at the file structure. It never hurts. Now you can easily make changes to the registry using reg files.

Greetings, in this article I will show you how to create a registry file yourself, which will be called upon to make changes to this very registry without manually navigating and editing it.

I think almost every one of you who found yourself on this page was faced with the need to make amendments to Windows. Or perhaps this was done as an experiment when adding/making adjustments to the appearance of the system.

Agree, it is much more pleasant to take advantage of the opportunity to do without a long search for the required registry section/hive in order to change the necessary parameters. And if you have learned the basics by making fun of friends and colleagues, then you can’t do without automated changes to the registry.

How to create a registry file? A little preparation...

All that is required of us is

  • force Windows to display files that enter the system. This is done in Folder properties after withdrawing the “check” opposite the item Hide extensions for registered file types:
  • get additional text editors like or Notepad++. But for starters, the built-in Notepad is also suitable.

How to create a registry file. Go…

Registry files are simple text files that obey the familiar letters of the Latin alphabet and mathematical symbols. But in order for the registry itself to recognize our files, we need to give the written form an appropriate appearance. That is, two conditions must be met:

  • the file must have its own .reg
  • and in the title of the document (the first line that Windows will see) there should be a standard line belonging to the Windows Registry Editor. It has remained unchanged for a long time:

Skip a line with a key Enter. And now in the line we write the path to the necessary parameters, keys, sections, enclosing it in square brackets(Necessarily). Here, by the way, you are free to specify any entry - if you came up with it, Windows will still create it, even if it is rubbish.

But we don’t need nonsense, and we will practice on useful changes in the system. There are plenty of them in the article “” - it’s full of useful functions that will appear or disappear after changes to the registry. I'm working on this article all the time, so check back from time to time...

EXAMPLE. CHANGE THE EXISTING PARAMETER VALUE

In the article linked above, I show how to speed up the computer shutdown time by reducing the time it takes to close individual programs. To do this we change the parameter WaitToKillServiceTimeout in section:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

giving the parameter a value of not 12000 (12 sec.), as it is by default - we are no longer interested in the current value - but the new one, say, reducing it to 10000 (10 sec.).

Well, let's write it like this in our file:

the path is in square brackets, remember?

In the new line we need to indicate what we want to do with the EXISTING parameter WaitToKillServiceTimeout:

don't miss the characters And =

And you can specify as many such lines as you like using Enter. All. Close the file, saving the changes and giving it the desired name, replacing the extension when saving the changes. txt on the. reg:

The shortcut icon immediately changes from “text” to a shortcut belonging to the registry file:

How to create a registry file. How to create a new parameter?

Nothing difficult either. We also open a text editor (I didn’t close the previous one and continue to fill out the file). Line

Windows Registry Editor Version 5.00

on the spot. I use the Enter key to go down a couple of lines and enter new values. Now I'll create a new parameter. For example, if in the section:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization

create parameter dword With name NoLockScreen and set it to “activate” – 1 , then you will need to create a registry file with the following script:

pay attention to the new symbols

  • = – assign characteristics
  • dwordparameter name
  • : - with meaning...
  • 00000001 …included

How to create a registry file. We delete the parameter.

In order to delete a registry value, we use the same syntax as in the paragraph above, only immediately after the “assign” symbol = you need to add a mathematical symbol “remove” or “minus”. Take a look:

The parameters in the registry are different, as are their semantic purposes. They depend on the type of parameter (string, binary, multistring, etc.), as well as on the system bit depth (DWORD, QDWORD).

In the next article we will look at how

What else... Let me remind you that it is better to practice all operations with the registry on a virtual machine, and then on your system after.

I wish you success.

Read: 1,398

REG format files can be opened with special programs. There are 2 types of REG formats, each of which is opened by different programs. To open the desired type of format, study the file descriptions and download one of the suggested programs.

.REG file extension

Stores the registration key, serial number, and other user registration information for a specific program. Created upon completion of registration. It is referenced by the program when opened to identify the user, but the file should not be opened manually.

Download the program for REG format

When launched, it updates the Windows Registry. Standard REG files can be created to modify various aspects of Windows. To create your own registry update file, follow these directions:

1. Run Regedit (Select Run from the Start menu, type "Regedit")

2. Select the register section you need to change

3. From the File menu, select Export

4. Select the "Selected Branch" option in the Export Range at the bottom of the window.

5. Save the file with the extension ".reg".

Note: Manually updating the Windows registry is a more advanced process and should only be attempted if you know exactly what to do. Incorrectly updating the registry can cause Windows errors.

How to open a REG (Registry File) file

Files with the extension reg needed to quickly make changes to the Windows registry (a kind of system-wide set of settings, configurations and parameters). Let's say we can quickly remove the trash can from the desktop or disable caps lock key(for example, it bothers me).
1. To create a file with the extension .reg, right-click on an empty area of ​​the folder or desktop, point to the “New” group and select “Text Document”.
2. You will be offered a standard name, something like "Text document.txt". Enter the desired name for the new file, for example for the already mentioned article " How to disable the Recycle Bin and remove it from your desktop"create a file named korzina.reg.
3. Confirm the extension change.

4. That’s it, a new file with the .reg extension has been successfully created.
5. To add commands and parameters to it, right-click on it and select edit.

6. The editor will open. Make the necessary changes and save the file by pressing Ctrl+S or select the "File" menu in the top panel, then the "Save" command.

7. To make changes to the registry, double-click our reg file, or right-click on it and select the first item “Merge”. Agree with the warning about changes to the registry.

Did you like the article? Share it