You must have read my article on Windows Registry which provides beginners details on the Windows Registry. Now I am going to briefly describe how to edit the registry through the Registry files and DOS.
Editing and .reg files
Windows Registry can be edited easily by the registry explorer provided by the Microsoft but the best way to edit registry is by making the registry files or .reg files as they are very helpful when you need to edit registry on some remote system.
SYNTAX:
RegistryEditorVersion (version 6 in Vista and 5 in XP sp2)
[Path of the registry root\key]
“Name of the key (data holder)”=DATATYPE: VALUE
The Header of the file is the Windows Registry Editor version. This is a very important part of a .reg files as it defines the executable limits related to the various Windows version. For example if you have written RegistryEditorVersion6 , then the registry file will not run on Windows XP and other earlier versions of Windows whereas if you write RegistryEditorVersion5 , then the registry file will run smoothly of all the versions of Windows except Windows 95 & 98.
The second line is to specify the path of the root\key. It’s very important to keep in mind that the registry path of different versions of Windows differ from each other and hence you should keep in mind the registry path structure while making the registry file.
The third line holds the name of the key or the data holder inside the “” and the DATAVALUE (binary, string, Dword etc.) followed by the value which is to be assigned to the key. When you are assigning a string value, then it’s not important to specify the data type and directly writing the value inside the “” will do the job. Put a “-“or hyphen after the = to delete the key.
Using the above syntax you can easily create a .reg file. I would suggest you to start playing with them as it would help you to understand editing of registry through registry files and you might learn something new!!!!