The reg file is what I'm talking about today. Registry script file, double-click to write the data into the registry. The registry script file allows you to make any operation about the key value on the registry, and it is not restricted by the registry being disabled.
Our usual changes to the registry can be broadly divided into two types:
1. Modify the registry sub-key;
2. Change the key value under the sub-key;
Here is a brief introduction to both of these changes in turn.
One, the modification of the sub-keys
(1) Adding sub-keys
Action: Simply add "[]" to the main file section to
For example, add a key value named "Walkrain" under Hkey_current_user/software.
REGEDIT4-------This system is suitable for more than 98, for the XP system can also be used "Windows Registry Editor Version 5.00"
[Hkey_current_user/software/walkrain]
Note the empty line between the REGEDIT4 and the key value!!!
(2) Delete sub-keys
Action: If you want to delete a primary key in the registry, simply add a "-" in the stylistic section. All the key values under this key value are removed.
Example: Delete the subkey you just created
REGEDIT4
[-hkey_current_user/software/walkrain]
Two. Changes to the key value
(1) Adding a key value
This operation, as in Registry Editor, right-click to add a key value.
Key value types typically include: String type (string), binary type (hex), and DWORD type
The general format is: "Key value name" = key value
If you add a string value, the "=" data is enclosed in double quotation marks.------NOTE: If the data contains the full path of a file, "/" is replaced with "//".
If you add a binary value, "=" after Hex: data.
If you add a DWORD value, "=" is DWORD: Data.
If you modify the default value of the key value, the format is "@=" data "
Example: Change the default value of the subkey you just created to "LCAZHJ" and establish the string value "name", the binary Value "age", and the DWORD value "Marriage No"
REGEDIT4
[Hkey_current_user/software/walkrain]
@= "Lcazhj"
"Name" = "LC"
"Age" =hex:22
"No" =dword:00000000
Append: If the child key in the added key value does not exist, the child key is created actively.
(2) Modifying key values
Similar to creation, for existing key values, simply assign the correct key value to the corresponding key value, and the new data overwrites the corresponding old data.
(3) Delete key value
Similar to deleting a subkey, it is also used "-", but at this point "-" is placed after "=".
Example: Delete the "name" key value under Hkey_current_user/software/walkrain
REGEDIT4
[Hkey_current_user/software/walkrain]
"Name" =-
Skills:
1. We have a confirmation dialog box when we double-click the reg file, we can use the Regedit.exe program's silent installation parameter "/S" to remove
Methods: Tools--Folder Options--File type--reg--advanced, check the merge below, click Edit on the right, and change the data under "Application for Action" in the dialog box to regedit.exe/s "%1".
2. The comment identifier in the registry script is ";"