It's the beginner's survival guide to using the Registry in Windows - discover how to back it up, access it and tweak it for troubleshooting and performance-boosting purposes. Part two of two
n the first part of this tutorial we looked at what the Registry is and how it works. We also revealed how to safely back up your Registry prior to making changes to it, plus took you on a quick tour of the Registry Editor tool, which is Windows' built-in tool for viewing and editing the Registry.
In this part we're going to look at making changes to the Registry. It's not as daunting as it sounds, so make sure you're backed up and read on.
Making changes to the Registry
There are various ways of making changes to the Registry, only one of which involves directly editing the Registry using Registry Editor. The simplest way to make Registry changes is to look for options within Windows XP or your favourite programs - this is by far the best way to tweak your system.
A second method is to use a program like Microsoft's TweakUI PowerToy (download it from here) - this is designed to make Registry changes as simple as possible by letting you select the options you want from a friendlier interface - once done, TweakUI then modifies the Registry for you.
When you back up the Registry by choosing File > Export within Registry Editor (see the step-by-step guide below), a special file is created that modifies the Registry for you. If you right-click this file and choose Edit instead of Merge, it'll open in Notepad, and you can see that it's basically a text file listing keys (in square brackets) and any values associated with those keys, including - where appropriate - their type.
These files can be packaged as they are and made available for download over the Internet, so it's possible to make Registry changes simply by saving these to your hard drive and double-clicking them to make the necessary changes. See the PC Guides link above for an excellent site that carries hundreds of Registry tweaks in this fashion.
WARNING #1
You might think that the five keys listed in Registry Editor (see the box) each represent a single hive, but it's not quite that simple. For example, the HKEY_LOCAL_MACHINE key contains four separate hives as subkeys: SAM, SECURITY, SOFTWARE and SYSTEM. At the same time, the HKEY_CLASSES_ROOT key is simply a shortcut to a subkey held inside the SOFTWARE hive. This can get very confusing, which is why it's best to think of the Registry as a single entity rather than as individual files. That way, you can understand it in terms of how it's presented in Registry Editor, which makes navigating it that little bit easier.
Take a tour of the Registry keys
Registry Editor organises its keys into five sections - here's what you'll find in each:
HKEY_CLASSES_ROOT: this contains all the information about the different file types (such as DOC or GIF) on your PC, including which program opens them, plus what options appear when you right-click that type of file. This is actually a shortcut to HKEY_LOCAL_MACHINE\SOFTWARE\Classes.
HKEY_CURRENT_USER: contains all Windows and application settings and preferences that are specific to the currently logged on user. It's a shortcut to the current user's key that's stored as a subkey under HKEY_USERS.
HKEY_LOCAL_MACHINE: contains all universal settings and preferences that apply to all users on your PC.
HKEY_USERS: contains each user's settings and preferences, including the Guest account and the master Administrator account. Each is stored in a subkey, and the currently logged on user's subkey is replicated under HKEY_CURRENT_USER.
HKEY_CURRENT_CONFIG: contains information about the currently loaded hardware profile.
Using Registry Editor
These options are all welcome, but if you can get over your fear of editing the Registry directly, you'll find Registry Editor is often the quickest way to make Registry changes. It's a good idea to back up first - either use System Restore or (our preferred option) Registry Editor itself as outlined on the previous page. Once done, follow the step-by-step guide below to make your first Registry change.
WARNING #2
All of your individual user account preferences and settings are stored in a hidden file called ntuser.dat, which you'll find inside your personal Documents and Settings folder. Do not attempt to delete this file - Windows should prevent you from doing so, but if you were to succeed you'd lose all of your personal settings and customisations. ERUNT backs up this file as part of its overall Registry backup.
Step-by-step:
Your first Registry tweak
1. OPEN REGISTRY EDITOR
Click Start > Run, type regedit and press [Enter] to open Registry Editor. Start by expanding the HKEY_LOCAL_MACHINE key by double-clicking it.
2. BROWSE TO CHOSEN KEY
Now expand the following keys in turn from the left-hand menu by double-clicking them: SOFTWARE > Microsoft > WindowsNT > Current Version.
3. BACK UP KEY
With CurrentVersion highlighted, choose File > Export. Leave the default settings as they are, give your backup a suitable name and click Save.
4. EDIT CHOSEN VALUE
Double-click the following value in the right-hand pane to change it: RegisteredOwner. Delete the existing name and type in yours, then click OK.
5. VERIFY CHANGE
Change the RegisteredOrganisation value as well if necessary. Close Registry Editor, click Start, right-click My Computer or Computer and select Properties to see your change.
6. RESTORE BACKUP
To restore your backup, browse to the My Documents folder and double-click the REG file you saved in step three. Click Yes when prompted to merge it followed by OK.
Some Registry tweaks require you to create new values from scratch. To do this, you'd select the appropriate key in the left-hand pane and then choose Edit > New before picking one from the five values on offer. You'll notice you can create new subkeys in the same way too, perfect if you're directed to a Registry key that doesn't yet exist.
If you accidentally type the wrong name for a new subkey or value, just click it with the right mouse button and select Rename. You'll notice you can delete subkeys and values from this menu too, so be careful.
Here's a tweak that involves creating a new Registry subkey and then modifying its (Default) value (which is automatically created alongside the key) - once complete, you'll be able to right-click any file or folder and choose Copy to, enabling you to quickly copy it to another location on your PC without having to open another Explorer window.
Browse to the following Registry key: HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers. With ContextMenuHandlers selected, choose Edit > New > Key. Name it Copy to. Once selected you'll see it has a (Default) value. Double-click this and change it to the following:
{C2FBB630-2971-11d1-A18C-00C04FD75D13}
Click OK and the option should be immediately accessible. If you want to add an option to move files in the same way, return to the ContextMenuHandlers key and create a new key called Move to. Change its (Default) value to the following:
{C2FBB631-2971-11d1-A18C-00C04FD75D13}
The final tweak we'll show you involves creating a new value, and will prevent you losing your dial-up connection when you log off and log on as a new user. Browse to the following Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. Choose Edit > New > String Value, name this KeepRasConnections and press [Enter]. Double-click this and give it a value of 1. Windows will now retain your dial-up connection when you next log off.
Even if you're unhappy at editing the Registry, you can still try to maintain it to keep your PC stable and running smoothly. For more details on keeping your Registry well maintained, keep checking back for an article on maintaining your PC, which will appear soon.
The Registry is a key part of Windows, but that's no reason to treat it with fear and suspicion. Hopefully you've learned a little bit more about how it works and have realised it's a useful tool that's worth exploring further.