Registry reg file full strategy-Registry use full Strategy 15

Source: Internet
Author: User


Registry reg file full strategy-Registry use full Strategy 15

1. What is Reg?

The reg file is actually a registry script file. You can double-click the reg file to import the data to the Registry. Using the reg file, we can directly modify the Registry. Its registry operations are not restricted by the Registry Editor. Therefore, the Registry Editor is more powerful and flexible. In addition, the reg file can be modified using any text file editing tool (such as NotePad). If an error occurs after the registry data is modified, you can also re-import the data in the reg file to restore the file. Therefore, it is safer to directly use the Registry Editor to modify the file, so you are familiar with the application of the reg file, sometimes it can get twice the result with half the effort and unexpected results.

2. Create a reg file

Reg file creation is very simple and can be achieved through any text file editing tool. Let's take creating a reg file restore. Reg that can lift the Registry's ban as an example to introduce the specific process.

Open notepad and enter the following content in the notepad file:

Regedit4

Empty row

[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System] "disableregistrytools" = DWORD: 00000000

Save the file, select the Save path in the open "Save as" dialog box, and 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 the txt extension), and then enter "Restore. reg and then press save. In the future, you can double-click this restore. reg to directly deactivate the registry.

3. Modify the reg file

When we use the reg file to operate the registry, there are two types of objects to operate on: one is to operate on the primary key, and the other is to operate on the key-value items under the primary key. You can add or delete a primary key, and add, modify, or delete a key-value item. Next we will implement it one by one.

1. Primary Key operations

(1) Add a primary key

To use the reg file to add a primary key to the Registry, you only need to enter the path of the primary key to be added in the form of "[]" in the file body.

For example, add a primary key named "software Studio" under the HKEY_LOCAL_MACHINE \ SOFTWARE primary key. The content is as follows:

Regedit4

Empty row

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Software Studio]

(2) deleting a primary key

Use the reg file to delete a primary key in the registry, and add a "-" symbol before the primary key path enclosed by "[]" in the file body, the delete primary key operation will delete all the subkeys and their key-value items under the primary key. Therefore, this is a dangerous command, so pay attention to it. For example, to delete the primary key we just added, the content is as follows:

Regedit4

Empty row

[-HKEY_LOCAL_MACHINE \ SOFTWARE \ Software Studio]

2. Operations on key-value items

(1) Add a key-Value Project

The operation to add a key-value project is like the "new" command in the Registry Editor. Generally, the key-value data types are divided into three types: string value, binary value, and DWORD Value. In the reg file, we also need to set the Data Type of the added key-value item. If you want to add a string value, "=" is followed by double quotation marks in English; if the value of the DWORD type is added, the format behind "=" is "DWORD: Data". If the value is a binary value, the value behind "=" is "HEX: data ". When you want to set the default value for the key-value data, the key-value name at the front of "=" should be the "@" symbol without double quotation marks.

For example, we want to set the default key value to "Studio" under the "HKEY_LOCAL_MACHINE \ SOFTWARE \ Software Studio" primary key, and add the "name" key value item (string value), "Age" key value item (binary value), and "Marital Status" key value item (DWORD value ). The contents of the reg file are as follows:

Regedit4

Empty row

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Software Studio]

@ = "Studio"

"Name" = "Xu XuXu"

"Age" = HEX: 23

"Marital Status" = DWORD: 00000000

When a key-value project is added, if the primary Key Path of the key-value does not exist, the primary key is automatically created when the key-value project is added. In addition, it is worth noting that when you add a string value to a key value item, when this string value includes the string value of the file path, the path separator is represented by a slash (\) to distinguish it from the primary key path Separator in the registry. For example, we want to register "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \

Add an application in the "C: \ Program Files \ boobsoft \ Screen Saver controller" directory to the Startup Group under the "run" primary key.ProgramThe startup key value item of the Screen Saver controller .exe. The reg file is as follows:

Regedit4

Empty row

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

"SCR" = "C: \ Program Iles \ boobsoft \ Screen Saver controller .exe"

(2) modify key-value items

In fact, modification and addition are similar. to modify the data of an existing key-value project, you only need to assign the correct data to the corresponding key-value project, new data will automatically overwrite incorrect old data. For example, when some malicious webpages modify the text in your IE title bar, the advertisement text of that website is always displayed in the title bar, which is annoying, we know that the text in the IE title bar is modified through "HKEY_CURRENT_USER \ Software \

You can use the reg file to change the default IE title bar text.

Regedit4

Empty row

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

"Window title" = ""

(3) Delete a key-Value Project

Using the reg file to delete a key-value project is also very convenient. Similar to deleting a primary key, it is implemented through the "=" sign, but this time it is not added before, instead, place the "-" symbol after the equal sign of the key-value project. For example, when some malicious webpages modify the settings such as the IE title bar, they also modify the key-value project data related to the Start Menu, the "run", "Search", "close" and other commands in the Start Menu are lost, import the following reg file and delete the corresponding key-value items. Then you can retrieve these commands from the Start Menu.

Regedit4

Empty row

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

"Norun" =-(remove the "run" command)

"Noclose" =-(retrieve the "close system" command)

"Nofind" =-(retrieve the "Search" command)

4. Import the data in the reg file to the Registry.

Import Information

When we double-click the reg file, the system will first prompt "are you sure you want to add the information in XXX. reg to the registry ?" In the dialog box, click the "yes" button, and the system will modify the registry according to the operations described in the reg file. After that, the system will prompt "XXX. the information in Reg has been successfully entered into the registry. The operation to import the information in the reg file into the registry is called "merge ".

Modify Default Value

Right-click the reg file and choose merge from the shortcut menu. There are three commands about the reg file: merge, print, and edit. The "merge" operation is displayed in bold, this is also the default open method, that is, the operation performed when double-clicking. If you do not want to double-click the reg file to perform the "merge" operation, you can change its default open mode to "edit ". Open the resource manager, click the "Folder Options" command in the "View" menu, and click the "file type" tab in the displayed dialog box, in the "registered file types" list, find and select the "Registry Project". We can also see from the "open method" below: the default "merge" operation for the reg file is associated with the Registry Editor Regedit! Next, click "edit" to open the "edit file type" dialog box, select "edit" in the "operations" list, and click "set as default, when you double-click the reg file, it will be opened in Notepad for editing.

Register/s "% 1" ", which is a hidden parameter"/s "called quiet import mode in the Registry Editor Regedit ", if you add the "/s" parameter when importing the reg file, the system will not directly import the file without any prompt dialog box.

Disable

Sometimes, after you disable Registry Editor on some computers, to prevent some computer experts from using the reg file, you can remove the restrictions on Registry Editor, this will set the default OPEN Program of the reg file to other unrelated programs. Of course, you can modify the related settings in the "Folder Options" and change them back, however, there is also a more absolute way to prevent Reg files from being opened by the system by default.

Run the Registry Editor and change the default value under "hkey_classes_root.reg" to "txtfile". At this time, the open method of the reg file directs to the TXT text file. People who do not know after this change cannot change the "registry project" setting in "folder type". Of course, the Registry Editor is disabled, you cannot modify it in the Registry Editor. However, the author found that there is another way to crack this type of disable reg file. You can press and hold the "shift" key on the edited reg file and right-click it. Then, the system will ask you to re-select the open mode, choose to Use Registry Editor Regedit to open the reg file and import it to 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.