How to lock and unlock the Win7 registry to avoid the registry being modified incorrectly

  

The Win7 registry is a very useful thing, but what should we do to avoid the registry being modified incorrectly or modified by someone else? Now Xiaobian teaches you how to lock your registry and unlock your own registry.

1.Lock the registry

Start--Run--"gpedit.msc

Open Group Policy

Left-level hierarchical expansion
>

User Configuration--"Administrative Template--"System

There is a

on the right to block access to the Registry Editing Tool

Set to Enabled

OK

Another:

Sometimes for computer security, you can prevent others from changing the registry settings by modifying the registry settings. Open the “Registry Editor” window, expand the “HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System” sub-item from the left column, and find or create a new DWORD value type name in the right column. For the item of "DisableRegistryTools", change its value to 00000001 or 00000002 to disable the use of the registry (the previous seven 0 can also be omitted)

2. Unlock the registry

Start--"Run--"gpedit.msc

Open Group Policy

Left-level hierarchical expansion

User Configuration--"Administrative Template--"System

There is a

on the right to block access to the registry editing tool

Set to disabled

OK

Another:

You can use the DOS command. At this time, we can modify the registry by executing “Reg” under DOS. The syntax is: reg import unlock.reg. “unlock.reg” refers to the registry information file with the extension "<;reg”" (Please do not think that the file name must be called "unlock.reg"; this is just an example, as long as the extension is REG is fine). If the .REG file is not in the current folder (for example, the .REG file is in C:\\Windows, but now in C:\\), the path to the .REG file name must be added. For example: reg import C:\\Windows\\unlock.reg, the meaning of this paragraph is to tell “Reg” enter the file named "ldquo;unlock.reg" in C:\\Windows. The .REG file is just a plain text file. There is no special place in the file format, so you can use Windows Notepad to make it. The only trouble is that you must know what registry value you want to modify.

Because the restriction does not allow users to execute the "Regedit" registry information is: HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System “DisableRegistryTools” So as long as we set the value of “DisableRegistryTools” to  quo;0” (representing the shutdown), or simply delete the Registry information (the clean operating system does not have this information). Then how to write this .REG file, in order to let “Reg” smoothly import the information into the registry? The method is as follows:

1. Make a .REG file

Create a new text file and enter the following:

REGEDIT4

[HKEY_CURRENT_USER\\Software\\ Microsoft\\Windows\\CurrentVersion\\Policies\\System]

“DisableRegistryTools”=dword:00000000

Note: <;REGEDIT4” There must be a blank line between this line and the following line.

After editing, save the file with a name, such as “unlock.reg” and save (this file can not be multi-character, can not be less characters, please remember to save the dialogue in the notebook when saving "Save type" in the box to select "All files (*.*)", otherwise it will be treated as a TXT file).

2, import REG file

Because in the Windows environment, there is no way to execute "Regedit" from the run, so you can change the command from DOS. The method is "Start → Program & Rarr; MS-DOS Mode" or execute from Run"CMD”. Of course, you want to use the boot disk to boot, from the pure DOS implementation is OK, but do not need such trouble, use the MS-DOS way in Windows.

Assuming my unlock.reg is placed in C:\\, type reg import C:\\unlock.reg and press Enter. The contents of “unlock.reg” are entered into the registry. At the same time, it also lifted the restriction that "Regedit" could not be executed.

To make a difference:

Why does the REG file start with "REGEDIT4"; instead of <;REGEDIT1” or "REGEDIT2”? Ha, the answer is simple, because this is "stipulations". The first line of the REG file such as Windows 95/98/ME/NT 4.0 must be “<quo;REGEDIT4”. Windows 2000/XP is "Windows Registry Editor Version 5.00”" to distinguish the operating system used. From this REG file, we can understand the content format of the REG file:

1. The first line must be: "REGEDIT4" or "Windows Registry Editor Version 5.00”" to distinguish the operating system;

2, the end of the registry information with “[” “] & rdquo; wrapped up;

3, & ldquo; & rdquo; inside is the string content;

4, "DWORD"; for ""0” is to use “dword:00000000” to indicate that the value of "DWORD" is 16-bit, 16-digit ""0” is “00000000”.

5, because there is only one line of registry information ([HKEY_CURRENT_USER\\Software\\Mi..]) in this example, so there is no blank line. And if there are more than two registry information, there needs to be a blank line between the information and the information.

6. What if I want to delete a registry message? Very simple, add the “-” (minus) sign in front of the registry information. For example, “unlock.reg”I can also write this:

REGEDIT4

[-HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System]

“-HKEY_CURRENT_USER\\Soft. . & rdquo; That's it, “DisableRegistryTools. . ” That line can be saved without writing, why? Because this line is telling "Regedit" directly to delete the "System" information deleted, and "DisableRegistryTools" is again under "System", the head is deleted, of course, the things inside will disappear. .

This is how to lock your registry has unlocked your own registry, if you are worried that your registry will be modified by others, then use this method to lock it.

Copyright © Windows knowledge All Rights Reserved