Windows Registry is a central hierarchical database used to store information that is necessary to configure the system for one or more users, applications and hardware devices.
The Registry contains crucial information which Windows continually references during operation, such as profiles for each user, applications installed on the computer and the types of documents that each can create, property sheet settings for and application icons, what hardware exists on the system, and the ports that are being used.
The Registry folders has replaced most of the text-based .ini files that were used in Windows 3.x, and other MS-DOS configuration files like the Autoexec.bat, and Config.sys. Though the Windows Registry is almost same in several Windows operating systems there are some differences among them.
A registry hive is a group of keys, subkeys, and the values in the registry that has a set of supporting files that contain backups of its data. The supporting files for all hives except HKEY_CURRENT_USER are in the %SystemRoot%\System32\Config folder on Windows XP. The supporting files for HKEY_CURRENT_USER are in the %SystemRoot%\Profiles\Username folder. The file extensions of files in these folders tells the type of data that they contain. No extension can also indicate the type of data that they contain.

Supporting files are as follows:
• HKEY_LOCAL_MACHINE\SAM  Sam, Sam.log, Sam.sav
• HKEY_LOCAL_MACHINE\Security Security, Security.log, Security.sav
• HKEY_LOCAL_MACHINE\Software Software, Software.log, Software.sav
• HKEY_LOCAL_MACHINE\System System, System.alt, System.log, System.sav
• HKEY_CURRENT_CONFIG  System, System.alt, System.log, System.sav, Ntuser.dat, Ntuser.dat.log
• HKEY_USERS\DEFAULT   Default, Default.log, Default.sav


Adding Registry Subkeys
To add a registry subkey or to add/change a registry value, make the appropriate changes in the registry and export the appropriate subkey or subkeys. Exported subkeys gets saved in
1. Click Start -> Run and type RegEdit in the Open box and then click on OK.
2. Locate and then select the subkey that holds the registry item or items that you want to change.
3. Click File -> Export.
Exporting backs up the subkey before you make any changes. In the File name box, type the file name to use to save the .reg file with the original registry items, and click on Save.
4. In the right pane you can add or modify the registry items you want.
5. Repeat step 3 and step 4, to export the subkey once again, but make sure you use a different file name for the .reg file. You can use this .reg file to make your registry changes on another computer.

Deleting Registry Keys and Values
To delete a registry key using a .reg file just put a hyphen “-“ in front of the RegistryPath in the .reg file.
For example to delete Test subkey from HKEY_LOCAL_MACHINE\Software put a hyphen in front of the HKEY_LOCAL_MACHINE\Software\Test
[-HKEY_LOCAL_MACHINE\Software\Test]
To delete a registry value with a .reg file, put a hyphen “-“ after the equals “=” sign, following the DataItemName in the .reg file. For example to delete the TestValue registry value put a hyphen after the “TestValue”= in the .reg file.
HKEY_LOCAL_MACHINE\Software\Test
“TestValue”=-

Renaming Registry Keys and Values
To rename a key/value, delete the key/value, and then create a new key or value with the new name.

How to Distribute Registry Changes
.reg file can be sent to users via email message. You can put the .reg file on a shared location on a network, and ask the users to the network share to run it. On double clicking the .reg file users will receive the following messages:
Registry Editor
“Are you sure you want to add the information in path of .reg file to the registry?”
If the user clicks on “Yes” then he/she will receive the following message:
Registry Editor
“Information in path of .reg file has been successfully entered into the registry.”

Note: Serious problems might occur if you modify the registry incorrectly. Therefore ensure that you follow these steps carefully. For added protection, back up the registry before you modify it. If registry modification leads to any problems restore the registry backup.