Menu
Is free
check in
the main  /  Installation and configuration / How to run the file reg. Windows Registry Basics

How to run the reg. Windows Registry Basics

These are small files that quietly do their job, allowing the computer to function normally and perform its assigned tasks. If the system files are damaged, then the operating system itself begins to work with errors ("buggy").

In the worst case, this can lead to a complete shutdown of Windows. This does not happen often, but there are several reasons why system files are damaged. One of them is the wrong actions of an inexperienced user, who, having overestimated his strength, tries to tune the operating system without having either knowledge or experience.

Therefore, I want to warn you right away - if you do not know what you are doing and what consequences this can lead to - DO NOT edit system files or delete them. Basically, this applies to any files with an unknown extension.

Let's start looking at system files with a reg file. Because it is with these files that users often meet. Despite this unusual extension, it is actually an ordinary text file. The reg extension tells the operating system that this file contains registry keys and specific parameters.

See below what the reg file looks like.

All information is clearly structured for ease of processing by a computer. So, for example, the obligatory first line REGEDIT with the required parameter indicates to the computer which version of Windows the reg file is intended for. Further, in a certain order, there are registry keys and parameters to them.

By the way, I have written an article more than once using this file. For instance, " "

What is the reg file for?

The main purpose of this type of service files is to work with registry keys. This is the easiest way to create or replace the required keys. In an applied sense, the reg file is used to create, store or change user settings. With it, you can quickly and easily transfer settings from one computer to another, or create a backup so that you can restore them in the future.

Working with such files is quite simple. To enter the necessary information into the operating system registry, open the reg file, and click "Yes" twice - agreeing to the changes that will be made to the registry. Then Windows will automatically create the required request, process it and enter the data into its registry.

How to work with reg file

Since, as I mentioned earlier, the reg file is essentially an ordinary text file, the programmers have not yet come up with a better tool for working with it than a notebook. You can use standard Windows Notepad or its equivalent. Based on my own experience, I can safely recommend using the Notepad +++ program. Firstly, it is free, and secondly, it has a lot of additional features.

Editing itself is no different from working with any text. To save the changes, it is enough to re-save the file using the "File" - "Save As ..." command or the hot key configuration "Ctrl" + "S".

The creation of a file with the reg extension is also done by the standard procedures "File" - "Create" or hot configuration of the keys "Ctrl" + "N". In addition, you can make a reg file using the standard procedure for exporting data from the registry.

In conclusion, I would like to note that working with such files does not cause problems for an experienced user. I would like to emphasize “ from an experienced user". If you are just starting to master the computer, I strongly recommend that you do not experiment with the registry. Because, as practice shows, in most cases such experiments lead to the need to restore the operating system. And you must agree that it is hardly necessary for you.

This article sets out the basic principles of working with the Windows registry, the knowledge of which will be useful to you in setting up the operating system using registry tweaks.

Terminology

Before getting down to business, you need to decide on the terminology. I use official Microsoft terminology, so the terms are quite consistent with the elements of the Registry Editor.

Figure 1 - Registry Editor

As you can see, there are no "branches" and "keys" here. Now to the point.

REG file

A REG file is a text file with the REG extension, composed in a specific format.

REG file format

Below is an example .reg file that turns off the recent documents menu.

Windows Registry Editor Version 5.00; Disable recent documents menu "NoRecentDocsMenu" \u003d hex: 01,00,00,00

Creating a REG file

It is very easy to create a REG file. Copy the code into any text editor (like Notepad). Press CTRL + S and save the file with any name and extension .reg, enclosing both in quotesto avoid txt extension.

Figure 2 - Creating a REG file

REG file syntax

  • Windows Registry Editor Version 5.00 - file header, which is its integral part. Also, you can find REGEDIT4 as a title - this is a Windows 98 / NT 4.0 format, which, however, will be understood by newer Windows operating systems. Read more about the differences in formats on the JSO FAQ (in English).
  • ; Disable recent documents menu - comment. All lines starting with ; (semicolon) represent comments.
  • Is a registry key. Graphically (in the registry editor) it represents the path to the parameter. In the .reg file format, sections are always enclosed in square brackets. In this example, the (sub) Explorer section belongs to the HKEY_CURRENT_USER section.
  • "NoRecentDocsMenu" \u003d hex: 01,00,00,00 - registry parameter and its value. Depending on the value of the parameter, the behavior of the operating system or object changes. Many parameters can be configured in the graphical interface of the operating system, but not all. In such cases, registry editors, tweakers or .reg files are used to change the parameter.

A .reg file can contain multiple registry keys and settings, but the header is used only at the beginning.

Windows Registry Editor Version 5.00; Disable restart in case of BSOD "AutoReboot" \u003d dword: 00000000; Disable notification on the welcome screen of unread messages "MessageExpiryDays" \u003d dword: 00000000

This REG file was obtained by exporting from the registry editor regedit.exe. With the help of .reg files, you can make changes to the system registry - this operation is called importing registry settings.

Exporting registry settings

Exporting registry settings is straightforward. As a rule, the parameters are exported before making changes to the registry (backup), or in order to create a .reg file for subsequent import into the registry of another computer, or during an automatic installation of the system.

There are various ways to export registry settings.

Windows Registry Editor (regedit.exe)

The Windows OS includes a program for editing the registry - regedit.exe... Since it is located in the system directory, you do not need to specify the full path on the command line to run it (for example, the following sequence will suffice: Start - Run - regedit - OK).

To export a registry key, just right-click on it and select the command Export (in Windows 2000 this command is located in the menu File).

Other Registry Editors

There are many programs for making changes to the system registry, which also have the ability to export settings. If you often work with the registry, then you will probably need a program that has an address bar. You can paste the copied (from an article or from a message on the forum) registry key into the address bar and quickly go to the desired parameter. An example of such a program is RegWorks.

Command line

From the command line, you can export registry settings using the command REG EXPORTwith the following syntax.

REG EXPORT Full path to the registry key in the form: ROOT \\ Subkey (only for the local computer). Root section. Values: [HKLM | HKCU | HKCR | HKU | HKCC]. The full path to the registry key in the selected root key. File name on disk to export. Examples: REG EXPORT HKLM \\ Software \\ MyCo \\ MyApp AppBkUp.reg Exports all subkeys and parameter values \u200b\u200bfor the MyApp section to the AppBkUp.reg file

Importing registry settings

There are several ways to import registry settings.

Launching a REG file using a graphical interface

This is the easiest way. It consists in running the REG file containing the required parameters by double clicking or from the command line.

Double click

No matter how trivial it sounds, you can make changes to the registry by double-clicking on the .reg file. True, at first the system will clarify whether you really want to do this. If the answer is yes, the changes will be made.

Figure 3 - The system asks for confirmation to make changes.

Because of this request, this method is not suitable for importing settings into the registry during an unattended system installation. But there are other ways too.

Command line

To import REG files from the command line, there is a command REGEDIT... By typing at the command line

REGEDIT C: \\ hklm.reg

You will get exactly the same dialog box as when you double-click the mouse. You can suppress the appearance of the dialog box by running the command with the parameter / S... This method is most often used during an unattended Windows installation.

REGEDIT / S C: \\ hklm.reg

REG ADD Command

Using the command REG ADD you can also import registry settings. It is convenient in that the commands for importing parameters can be included in a batch file that also performs other tasks (that is, there is no need for an additional REG file). For example, this command is often used to import registry values \u200b\u200binto the RunOnceEx key and then install programs when you first log on. The command syntax is quite simple - look it up yourself by running the command in the command line REG ADD.

INF file

You can also import settings into the registry using INF files. Their general syntax is somewhat more complicated than that of REG files, but writing directly to the registry is quite simple. Below is an example from addon Msgina

Signature \u003d "$ Windows NT $" Msgina OptionDesc \u003d "Msgina" Tip \u003d "Login GINA Library" Modes \u003d 0,1,2,3 AddReg \u003d Msgina.AddReg HKLM, "Software \\ Policies \\ Microsoft \\ Windows \\ System \\ Note

... More information on INF files can be found in.Greetings, in the article I will show you how to create a registry file yourself, which will be designed to make changes to this very registry without manually navigating and editing it.

I think almost every one of you who happened to be on this page was faced with the need to amend Windows. Or, perhaps, this was done as an experiment when adding / making settings to the appearance of the system.

Agree, it is much more pleasant to take the opportunity to do without a long search for the desired registry key \\ hive in order to change the necessary parameters. And if you have learned the basics by poking fun at friends and colleagues, then you cannot do without automated changes to the registry.

How do I 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 removing the "check" opposite the item Hide extensions for registered file types acquire additional text editors such as:
  • or notepad ++ ... But for starters, the built-in Notepad is also suitable.How to create a registry file. Go…

{!LANG-355774c79fa1b2b3fce7e254674903a9!}

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, it is necessary to give the written form the appropriate form. That is, two conditions must be met:

  • the file should have its own .reg
  • and in the title of the document (the first line that Windows sees) should be the standard line of ownership of the Windows Registry Editor. It has been unchanged for a long time:

Skip the line with the key Enter... And now in the line we write the path to the necessary parameters, keys, sections, by enclosing it in square brackets (required). 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 do not need rubbish, but we will practice on useful changes in the system. There are a lot of them in the article “” - there are many useful functions that will appear or disappear after changes in the registry. I am working on this article all the time, so check back from time to time ...

EXAMPLE. CHANGE THE EXISTING VALUE OF THE PARAMETER

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

HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Control

giving the parameter a value not 12000 (12 sec.), As it stands by default - we are no longer interested in the present value - but the new one, say, by lowering it to 10000 (10 sec.).

Well, let's write this in our file:

the path is in square brackets, remember?

In a new line, you need to indicate what we want to do with the AVAILABLE parameter WaitToKillServiceTimeout:

don't miss the symbols and =

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

The shortcut icon immediately changes from "text" to a shortcut that belongs to the registry file:

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

Nothing difficult either. We also open a text editor (I did not close the previous one and continue to fill in the file). Line

Windows Registry Editor Version 5.00

in place. I go down with the Enter key a couple of lines down and enter new values. Now I will 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 new symbols

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

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

In order to delete a registry parameter, 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 well as their semantic purpose. They depend on the type of parameter (string, binary, multi-line, etc.), as well as on the system capacity (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 in a virtual machine, and then in your system after.

I wish you success.

Read: 1 398

REG file could be opened by special software. There are 2 types of REG formats, each of which opens with different programs. To open the required type of format, study the descriptions of the files and download one of the proposed programs.

REG file extension

Stores the registration key, serial number and other custom registration information for a specific program. Created at the end 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 the REG format

Updates Windows Registry on startup. REG standard files can be created to modify various aspects of Windows. To create your own registry update file, follow these steps:

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

2. Select the register section you want 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: Updating the Windows registry manually is a more advanced process and should only be done if you know exactly what to do. Incorrect register update can cause Windows errors.

How to open a reg file (Registry file)

syntax, reg file structure​


____________________
what is a reg file?
it is a file containing information for interacting with registry entries.

Attention!
before doing anything, be sure to make a backup copy of the registry !!!

___________________________________________________

So, the most common tool for working with the registry is the utility regedit.

With its help, we can perform all the necessary operations.
Create, modify, save, import, export, delete and other operations with system registry objects.

Let's try?
Let's create our own command in the context menu.
To do this, open the section

The code:

HKEY_CLASSES_ROOT \\ DesktopBackground \\ Shell

We create a section named name.
it has one more section-command.

In section name-Create a string parameter - reg_sz
and give it any value, for example

The code:

My first bullshit ...

My sick fantasy has taken this name, you are free to choose your ...

And in the section command create a similar string parameter with the name of the command being executed.
It took me into my head regedit.exe
As a result, when we right-clicked, we got the following command of the context menu:

By pressing we call the registry editor ...

You can simplify your task by using registry tweak.

Yes...
You do not have to poke around in the registry editor, but simply enter the necessary information into the registry using a file with the extension .reg

How does it look in practice?

If all described operations write to reg file, then we get the following:

The code:

Windows Registry Editor Version 5.00 @ \u003d "my first bullshit ..." @ \u003d "regedit.exe"

Any text editor is suitable for creating a reg file.
I took a notebook.
So, let's create a new test document.
In the previous example, we added new parameters and keys to the registry.
Let's remove them now.
To do this, in a text document, enter:

The code:

Windows Registry Editor Version 5.00 @ \u003d "my first bullshit ..." \u003d - [-HKEY_CLASSES_ROOT \\ DesktopBackground \\ Shell \\ name \\ command] @ \u003d "regedit.exe"

Save as-all files-name with .reg extension (for example tweak.reg)
Double click on the resulting file, apply, ok.
Let's look at the registry - we see that the command section has been removed, and the parameter that we created earlier has been removed in the name section.
now it's time to figure out the syntax.

The code:

Windows Registry Editor Version 5.00

required line - indicates the version of the editor.

Registry_editor_version is either "Windows Registry Editor Version 5.00" for Windows 2000, Windows XP and Windows Server 2003, or "REGEDIT4" (capital letters required) for Windows 98 and Windows NT 4.0. The REGEDIT4 header can also be used on computers running Windows 2000, Windows XP, and Windows Server 2003.

2)
The next line should be empty.

The code:

Note:
If the section does not exist, then it will be created.
If it is, then parameters or changes contained in the tweak will be added to it.
In other words, the item will be overwritten.

4)
Parameter name is the name of the imported data parameter. If the file data item is not in the registry, the .reg file adds it (with a value). If the item exists, the value in the .reg file overwrites the existing value. The item name is enclosed in quotation marks. The item name is followed by an equal sign (\u003d).

5)
Value, parameter type