Registry reg file Full Introduction-Registry use of the full introduction of the XV _ registration form

Source: Internet
Author: User
Tags delete key

Registry reg file Full Introduction-Registry use of the full introduction of the XV

1. What is reg file


A reg file is actually a registry script file that you can double-click to import data into the registry. The reg file allows us to make any modifications to the registry directly, and it can operate on the registry without being disabled by Registry Editor, making it more powerful and flexible, and because the reg file can be modified with any text file editing tool, such as Notepad, So after modifying the registry data, if there is an error, can also be changed back to the data in the reg file and then import, so as to achieve recovery operation, so it is more secure than using Registry Editor to modify, so proficient in the use of reg file, sometimes can play a multiplier, unexpected effect.

2. Create reg file

The creation of a reg file is very simple and can be achieved through any text file editing tool. Let's take a look at the specific process by creating a reg file Restore.reg that unlocks the registry to disable the restrictions.

Open Notepad and enter the following in the Notepad file:

REGEDIT4

Empty line

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools" =dword: 00000000

Save this file and select the saved path in the Open Save As dialog box. Click the drop-down arrow in Save type to select All files (be sure to select this step, otherwise the saved file will automatically add a txt extension), and then press "Save" when you enter "Restore.reg" in "filename" button You can then double-click the Restore.reg to unlock the registry restrictions directly.

3, the reg file to modify

When we use a reg file to manipulate the registry, there are two types of objects to be manipulated: one is to operate on the primary key, and the other is to operate on the key-valued item under the primary key. The operation of the primary key is added and deleted, while the operation of the key value item is divided into three kinds: adding, modifying and deleting. Let's do it one at a while.

1, the operation of the primary key

(1) Add primary key

It is very convenient to add a primary key to the registry by using a reg file, simply write the primary key path to add in the file body section directly as "[]".

For example: Under the HKEY_LOCAL_MACHINE\Software primary key, add a primary key called "software Studio", which reads as follows:

REGEDIT4

Empty line

[Hkey_local_machine\software\ Software Studio]


(2) Delete primary key

To delete a primary key in the registry with a reg file, with a "-" symbol in front of the primary key path enclosed in the file body part "[]", deleting the primary key will delete all subkeys under that primary key and its key value items, so this is a dangerous command to use with great care. For example, to delete the primary key that we just added, the following:

REGEDIT4

Empty line

[-hkey_local_machine\software\ Software Studio]

2, the operation of key-value items

(1) Add a key value item

Adding a key value item is like the new command in Registry Editor, in general, the data type of the key value is divided into three types: string value, Binary value, and DWORD value. In the reg file we also want to set the data type of the added key value item, if you want to add a string value, enclose the data in double quotes in English after the "=" number, and if you add a DWORD type value, the format behind the "=" Number is "DWORD: Data"; If you add a binary value, "=" Behind the number is "HEX: Data". To set the key value data for the default value, the key value name at the front of the "=" number should be the "@" symbol and there is no double quotation mark.

For example, to set the default key value to "studio" under the "Hkey_local_machine\software\ software Studio" PRIMARY key, add the Name key item (string value), The Age key item (binary value), the Marriage no key item (DWORD value), respectively. The contents of the corresponding REG file are as follows:

REGEDIT4

Empty line

[Hkey_local_machine\software\ Software Studio]

@= "Studio"

"Name" = "Slowly Xu"

"Age" =hex:23

"Marriage No" =dword:00000000

When you add a key value item, if the key value contains a primary key path that does not exist, the primary key is automatically created when the key value item is added. There is also a point to note when adding a key value item for a string value when this string value is a string value that includes the file path, the path delimiter is represented by the "\" double slash to differentiate it from the primary key path separator in the registry. For example, we are registering "hkey_local_machine\software\microsoft\windows\currentversion\

The Startup group under the Run primary key is added to the Startup key item of an application "screen saver controller. exe" in the "C:\PROGRAM files\boobsoft\ screen Protection Controller" directory, and the contents of the Reg file are as follows:

REGEDIT4

Empty line

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"SCR" = "C:\\Program iles\\boobsoft\\ screen protection controller \ \ Screen protection controller. EXE"

(2) Modifying key value items

Actually, the modifications and additions are very similar, for existing key-value items, we need to modify their data, only the correct data to the corresponding key items, the new data will automatically overwrite the wrong old data, for example, when some malicious Web page modified your IE title bar text, In the title bar always show that site ads text, very annoying, we know to modify IE title bar text is through the "hkey_current_user\software\

Microsoft\internet the data of the "window Title" key value under Explorer\Main "PRIMARY Key" is set, then we can change it back to the default IE title bar text through the reg file.

REGEDIT4

Empty line

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]

"Window Title" = ""

(3) Delete key value items

It is also convenient to delete key items with a reg file, which is similar to deleting a primary key, and is implemented by the "=" number, but this time it is not added to the front, but the "-" symbol is placed behind the equals sign of the key value item. For example, some malicious Web pages in the change IE title bar settings, and so on, also modified the Start menu related key value project data, so that the Start menu "Run", "find", "close" and other commands are missing, import the following reg file to delete the corresponding key items can be retrieved from the Start menu of these commands.

REGEDIT4

Empty line

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

"NoRun" =-(remove "Run" command)

"Noclose" =-(retrieve "shutdown system" command)

"Nofind" =-(get back to "find" command)



4. Import the data from the reg file into the registry

Import information

When we double-click the reg file, the system first prompts "Are you sure you want to add the information in the Xxx.reg to the registry?" Query dialog box, click "Yes" button, the system will be in accordance with the operation described in the reg file to modify the registry, completed and will give a hint "XXX." The information in Reg has been successfully entered into the registry, and importing information from a reg file into the registry is called merging.

modifying default values

Right-click on the reg file, there are three commands on the reg file: Merge, Print, edit, in bold display is the "merge" operation, which is the default open way, that is, double-click the operation. If you do not want to do a "merge" operation when double-clicking a reg file, you can change its default open mode to "edit". Open Explorer, click Folder Options on the View menu, in the Open dialog box, click the File Type tab, and then locate and select registry entries in the registered file types list, as we can see from the "Open by" method: the original reg file defaults to "merge" The operation is associated with Registry Editor regedit! Next click on the "Edit" button, open the "Edit File Type" dialog box, and then select the "Action" List of "edit", and then click the "Set as Default" button, you can double-click the reg file will be used Notepad to open for editing.

Here the author by the way to tell you a unique stunt, if you want the reg file to be imported without any prompts, you can select Merge in the dialog box shown in Figure 4, and then click the Edit button to enter "regedit.exe/s"%1 "on the command line of the pop-up dialog box. This is a hidden parameter "/S" that is called the quiet Import mode using Registry Editor regedit, and if you add the "/S" parameter when you import a reg file, the system will not pop up any prompts dialog box and import it directly.


Remove disable

Sometimes when disabling Registry Editor is set up on some computers, in order to prevent some computer experts to use reg files, to remove the restrictions on Registry Editor, the reg file's default open program is set to other unrelated programs, of course, you can modify the "Folder Options" in the relevant settings to change back, But there is a better way to make a reg file not open in the system default way.

Run Registry Editor to change the default value under "Hkey_classes_root.reg" to "txtfile", when the Reg file is opened to a txt text file. The person who does not know after this change even if you modify the registry entries setting in the folder type, you will not be able to change the Registry Editor, but you cannot modify it through Registry Editor. But after the author's research found that there is another way to crack this disabled reg file. We can press "shift" on the edited reg file and click the right mouse button, then the system will let you choose to open the way, from which you can choose to use Registry Editor regedit open to import reg files into the registry





(Source: Hotspot Network)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.