BOOT CAMP 569 (25/03/09) - The Windows Registry, part 2
Now that you know what the Windows Registry does and where it
lives (see part 1), it is time to take a look at its structure. Windows
protects Registry files so you can't just open them in Windows Explorer but
Microsoft thoughtfully provides a tool for viewing and editing the Registry,
called the Windows Registry Editor, or just 'Regedit'. To launch it go to Run
(in XP) or Search (in Vista), type regedit and hit Return.
If you are a new to this look but don't touch. Alterations to
the Registry can have far reaching effects and in extreme cases, may even stop
Windows working but more importantly there are none of the usual safety nets.
That means if you make a change it will be enacted straight away. There's no
second chances or OK or Cancel dialogue boxes. With that in mind, when we've
finished here pop down to the bottom of the page to this week's Top Tip and
I'll show you how to make a manual backup your Registry, and how to restore it
if things go wrong.
Hopefully I haven't put you off opening Regedit to have a look
around and if you do, you will see that it looks like a Windows Explorer
window. There are two panes showing a directory tree on the left containing a
set of folders, and the contents of those folders are shown in the larger right
pane. In XP and Vista there are five main folders or 'Hives' and they contain
various types of Registry files, called Keys, Sub Keys, Sub-Sub Keys even, and
Values. Values are the nuts and bolts of the Registry, they're the chunks of
data and information that determine how Windows looks and behaves.
That was the easy bit, unfortunately from now on we are going to
have to use the odd bit of jargon and wade through a lot of capitalised words,
but bear with me, it's really not as bad as it looks.
There are three types of Values called Binary, DWORD and String. A
Binary Value is simply a number, or numbers, in binary form -- i.e. lots of
ones and zeros - and it usually represents a configuration setting in a
hardware component. A DWORD Value is composed of 4 bytes or 32 bits of
information and can be used for almost anything including switching things on
and off; for example a DWORD Value 1 usually means something is enabled and 0
means it is disabled. Strings come in several flavours and can be readable
text, Values that contain variables, which can be changed by applications,
lists, multiple values and so on.
Back now those Hives in the left hand pane and from top to bottom
they are: HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS
and HKEY_CURRENT _CONFIG. We'll dissect them one at a time and their name and
function should become clearer.
The first one, HKEY_CLASSES_ROOT is one of the most important as
it contains a lot of detailed information about Windows, including things like
program shortcuts, the Windows user interface, drag and drop features and file
associations. The latter is how Windows knows to open Microsoft Word if you click
on a file with a .doc extension, or launch your media player when you click on
an mp3 file, and so on.
The HKEY_CURRENT_USER Hive is not a permanent fixture as such but
created every time a new user logs on to the computer. In other words it's the
current user's profile and the data it represents is actually stored in the
HKEY_LOCAL_MACHINE is used by everyone logged on to the computer
and it's where the data and information about your PC's hardware and system are
kept. This includes device drivers, hardware such as system memory hard drives
and ports plus software configuration and startup settings.
HKEY_USERS is where the settings and customisations for every user
of the computer are kept. This can be anything from details of a user's
preferred screen saver and background, to the most recently opened documents
and files, and the sound Windows makes when the user logs off.
Finally, there's HKEY_CURRENT_CONFIG and this is a bit like the
CURRENT_USER Hive in that it doesn't actually contain any data but points to
the hardware configuration settings for whoever is using the computer and these
are actually stored in the HKEY_LOCAL_MACHINE Hive.
If you have made it this far, well done, and you are excused if it
still sounds like a load of gobbledegook but the basic points to take home with
you are these. Think of the Registry as a filing cabinet containing information
about your computer, the software installed on it and your preferences, and
this is permanently stored in the HKEYs ROOT, MACHINE and USERS Hives. When you
switch on and log in two new temporary Registry Hives are created, called
CURRENT_USERS and CURRENT_CONFIG and these contain all of the information
Windows needs to set the computer up to your liking, and for the moment that's
really all you need to know...
Next Week - The Windows Registry, part 3
Numbering system with a base of 2, where values are represented by
zeros and ones
Short for Double Word, a 'Word' in computing represents 2 bytes or
16 bits of data
A sequence of characters, usually letters and numbers but may also
be symbols or binary, or hexadecimal numbers
Although Windows System Restore automatically backs up the
Registry every 24 hours there's nothing to stop you making a manual backup
using Regedit. All you have to do is go to File > Export and fill in the
File Name box. I usually use the today's date. Click Save and a copy of your
Registry is saved in the My Documents/Documents folder with the extension .reg.
If, heaven forbid, you have any problems with the Registry all you have to do
is double-click on your saved .reg file and your backup will restore the
Don't forget, there's a full archive of previous Boot Camp Top
Tips at www.pctoptips.co.uk
© R. Maybury 2009, 0403
Part 1 3