Windows Registry Tutorial
This article explains how to use the Windows Registry.
The Registry is the central storehouse for all settings for the Windows operating systems.
This includes hardware configuration, file associations, and control panel settings.
Many other programs will also store settings in the registry.
Accessing the Registry
To examine and modify the registry, use the regedit.exe program that is located in the operating system directory.
To open regedit.exe, follow this procedure:
1. Open the Start Menu.
2. Choose "Run".
3. Enter "regedit" and press Enter.
To open regedit.exe, follow this procedure:
1. Open the Start Menu.
2. Choose "Run".
3. Enter "regedit" and press Enter.
Structure
The registry is made up of "Keys".
Each key is like the branch of a tree.
Each key has one parent key, and zero or more child keys.
Each key can contain zero or more "Values", each of which contains a single piece of data.
To make navigating the registry a bit easier, you can think of the registry's construction like your hard drives.
Hard drive <-> Registry
Folders <-> Keys
Files <-> Values
The registry contains 6 main keys:
To make navigating the registry a bit easier, you can think of the registry's construction like your hard drives.
Hard drive <-> Registry
Folders <-> Keys
Files <-> Values
The registry contains 6 main keys:
- HKEY_CLASSES_ROOT ---- Contains information on file types, including which programs are used to open a particular file type.
- HKEY_CURRENT_USER ---- Contains user-specific settings that are built from information in the HKEY_USERS key during the logon process.
- HKEY_LOCAL_MACHINE ---- Contains computer specific information including installed hardware and software. This is the one users tend to spend the most time in.
- HKEY_USERS ---- Contains information (generic and user-specific) about all the users who log on to the computer. The generic settings are available to all users who log on to the computer. The information is made up of default settings for programs, desktop configurations, and so on. This key contains subkeys for each user that logs on to the computer.
- HKEY_CURRENT_CONFIG ---- Contains information about the computer's hardware configuration .
- HKEY_DYN_DATA ---- Contains real-time performance statistics on the computer's hardware.
Backing-Up the Registry
On Windows NT, 2000, XP, 2003, and Vista the operating system does not allow the user to directly
manipulate the registry files.
To perform a backup, you must use the Microsoft Backup Utility.
To launch this utility, open the Start Menu, choose "Run", enter
"ntbackup.exe", and press the Enter key.
On Windows 95, 98, and ME, the registry is stored in two files, SYSTEM.DAT and USER.DAT. SYSTEM.DAT contains all hardware and computer specific information. USER.DAT contains all user-specific information.
These files are located in the operating system directory, typically "c:\windows". However, if you are using "User Profiles", you should also backup the User.dat files located in:
C:\Windows\Profiles\<username>
where <username> is the name of each user.
Creating The Registry Backup
To backup the registry, enter the following commands at the DOS prompt:
Alternatively, if "User Profiles" are enabled, this example would change to:
Please note that these examples assume that the operating system directory is "c:\windows" and the destination of the files is "d:\backup".
Restoring A Registry Backup
Simply reverse the above process. This is best done from DOS, since the registry files could be in use, and Windows will have to be rebooted anyway. To enter DOS, open the Start Menu, choose "Shut Down", then choose "Restart in MS-DOS Mode".
Alternatively, if "User Profiles" are enabled, this example would change to:
Windows also makes its own backup of the registry each time it boots up. When you don't have a good backup, you can try using the backup created by Windows. The backup files are located in the operating system directory. The .dat extension is changed to .da0. The following DOS commands would restore this backup:
On Windows 95, 98, and ME, the registry is stored in two files, SYSTEM.DAT and USER.DAT. SYSTEM.DAT contains all hardware and computer specific information. USER.DAT contains all user-specific information.
These files are located in the operating system directory, typically "c:\windows". However, if you are using "User Profiles", you should also backup the User.dat files located in:
C:\Windows\Profiles\<username>
where <username> is the name of each user.
Creating The Registry Backup
To backup the registry, enter the following commands at the DOS prompt:
c:
cd \windows
xcopy /h system.dat d:\backup
xcopy /h user.dat d:\backup
Alternatively, if "User Profiles" are enabled, this example would change to:
xcopy /h c:\windows\system.dat d:\backup
xcopy /h c:\windows\profiles\<username>\user.dat d:\backup
Please note that these examples assume that the operating system directory is "c:\windows" and the destination of the files is "d:\backup".
Restoring A Registry Backup
Simply reverse the above process. This is best done from DOS, since the registry files could be in use, and Windows will have to be rebooted anyway. To enter DOS, open the Start Menu, choose "Shut Down", then choose "Restart in MS-DOS Mode".
d:
cd \backup
xcopy /h system.dat c:\windows
xcopy /h user.dat c:\windows
Alternatively, if "User Profiles" are enabled, this example would change to:
xcopy /h d:\backup\system.dat c:\windows
xcopy /h d:\backup\user.dat c:\windows\profiles\<username>
Windows also makes its own backup of the registry each time it boots up. When you don't have a good backup, you can try using the backup created by Windows. The backup files are located in the operating system directory. The .dat extension is changed to .da0. The following DOS commands would restore this backup:
c:
cd \windows
xcopy /h system.da0 system.dat
xcopy /h user.da0 user.dat
Searching the Registry
You can search the Registry by choosing "Find" from the Edit menu, or pressing Ctrl+F.

It is quite easy to search the Registry for items that might apply to a particular aspect of Windows or your installed software that you want to change. However, it can also be time-consuming - especially if you have an older, slow computer. It can be misleading as well, since you may not be sure what the references you find in the Registry actually do, so be cautious.
In the "Find What" field, type in what you're looking for and, in the "Look At" section, check off whether you want to search the Keys, Value Names, or Value Data, or any combination of these. If it finds an instance, you may want to check to see if there are any further references. Under the File menu, select Find Next, or just hit the F3 key.

It is quite easy to search the Registry for items that might apply to a particular aspect of Windows or your installed software that you want to change. However, it can also be time-consuming - especially if you have an older, slow computer. It can be misleading as well, since you may not be sure what the references you find in the Registry actually do, so be cautious.
In the "Find What" field, type in what you're looking for and, in the "Look At" section, check off whether you want to search the Keys, Value Names, or Value Data, or any combination of these. If it finds an instance, you may want to check to see if there are any further references. Under the File menu, select Find Next, or just hit the F3 key.
Editing the Registry
Modifying the registry can potentially make Windows unbootable.
Be careful!
Always make a backup of the registry before making changes.
To edit a registry value, first navigate the tree until the value is displayed. Usually, you will know where you are going. If not, use the Find tool (described above).
In this example, we have navigated to the registry value that controls the delay before a menu pops up.

To edit a value, double click on its name. If you are following this example, go ahead and change the MenuShowDelay value from 100 to 0. After making this change, like most changes made in the registry, you will need to reboot. After rebooting, all menus should pop up noticeably faster.

To edit a registry value, first navigate the tree until the value is displayed. Usually, you will know where you are going. If not, use the Find tool (described above).
In this example, we have navigated to the registry value that controls the delay before a menu pops up.

To edit a value, double click on its name. If you are following this example, go ahead and change the MenuShowDelay value from 100 to 0. After making this change, like most changes made in the registry, you will need to reboot. After rebooting, all menus should pop up noticeably faster.
Removing Entries
- Navigate to the key or value that you wish to delete.
- Make sure the key or value is selected.
- Right-click on the name of the key or value, then select Delete. Or, press the Delete key.

Adding to the Registry
- Navigate to the parent key where you wish to add a value.
- Right click on the key name, and open the "New" submenu. Choose the type of data you wish to add.
- Enter the name of the value.
- Edit the value by double clicking on its name.
- It may be necessary to reboot to make the change take effect.