|
BOOT CAMP 126
THE
WINDOWS REGISTRY, PART 1
As regular readers of Boot Camp and F!F!F! know we
occasionally refer to a set of files in Windows 95 and 98 called the Registry,
usually prefaced with dire warnings about not interfering with it! There’s a
very good reason for that, the Registry is a huge database containing critical
settings that determine how Windows and all of the software and hardware used
by your PC works, which is why Microsoft has gone to the trouble of hiding it
away.
Changes to the Registry are carried out when you install new
software or hardware, or if you alter desktop settings via the Control Panel or
with utilities like Tweak UI. Under normal circumstances there is no reason why
you should need to go anywhere near the actual files, however the Registry is
often directly involved in crashes or malfunctions and a little background
knowledge might prove useful if your PC starts misbehaving; if nothing else an
insight into the workings of your PC is empowering and can help dispel some of
the mystery. This week we’ll take a brief guided tour around the Registry, next
week, if you’re feeling brave, we’ll tackle a few simple tweaks that illustrate
the power the Registry has over Windows.
Registry data is contained in two files called ‘user.dat’
and ‘system.dat’ and they are stored in the main Windows folder. Because of
their importance they are automatically backed up. Windows 95 makes copies
every time it boots up successfully, called ‘system.dao’ and ‘user.dao’.
Windows 98 is even more cautious and keeps up to five recent copies of the
Registry and critical system files (system.ini & win.ini) in a Windows
folder called Sysbckup (they’re usually called rb00.cab etc.). As a further precaution
Windows 95 and 98 also keeps a copy of the Registry when it was first installed
on your PC, this is called ‘system.1st’ and lives in the root directory of the
C: drive. An expert can use this file to get your PC working when all other
attempts to restore the Registry have failed. More routine problems with a
‘corrupt’ Registry – caused by faulty software or a failed installation – may
generate an error message to the effect that Windows will revert to a saved
backup, if you are given the option it is wise to click OK and let your PC
carry out the procedure.
You can view the Registry, and make manual changes to the
data (though don’t be tempted just yet!) with a hidden Windows utility called
Regedit. On the Start menu select Run and type ‘regedit’ (without the inverted
commas of course), and an Explorer type window opens. To close Regedit simply
click on the ‘X’ in the top right hand corner or select Exit on the Registry
menu.
For the sake of clarity Registry data files are presented as
single directory tree with six ‘branches’ in the left hand pane. At the top is
HKEY_CLASSES_ROOT; this contains details about which files are associated with
which programs, shortcut data and information about Object Linking and
Embedding or OLE. This is the way Windows allows bits of information (text,
graphics, images etc.) to be copied between and inserted into different
applications.
The second branch is HKEY_CURRENT_USER and this includes the
personal preferences (appearance, colour schemes, screen saver etc.) of whoever
is logged onto the PC at the time. HKEY_LOCAL-MACHINE stores general settings
and preferences for all of the PC’s hardware and software. HKEY_USERS is where
the details of everyone who is logged onto the machine are kept.
HKEY_CURRENT_CONFIG contains more information about the way the PC is set up
and lastly HKEY_DYN_DATA, which is a record of all of Windows Plug and Play
features that changes as and when devices are added or removed from the system.
Before we go any further it’s a good idea to know how to
make a manual backup of your PCs Registry so you can easily restore it should
something go amiss. You should do it before you make any changes to the
Registry, in fact get into the habit of doing it every time you open Regedit.
Start by deciding where to keep your backup file, it should be somewhere you
can easily find it or better still, create a special folder for the purpose.
Open Windows Explorer, click once on the Drive C: icon to highlight it then go
to the File menu. Select New click on Folder and an icon called ‘New Folder’
appears at the bottom of the screen. The name should be highlighted, press
backspace to clear the text field and rename the folder Myback, or something
equally memorable, press Return then close or minimise Explorer and return to
Regedit. Go to the Registry drop-down menu and select Export Registry File. In
‘Save In’ navigate your way to your newly created Myback folder and in the
‘File Name’ field call it something like Regbak, click Save and it’s done. This
will create a text file called regbak.reg, if you ever need to restore the
Registry after an editing session simply double-click on Regbak.reg, you will
be asked if you want to ‘add the information to the Registry…’, click yes and
the file will be restored.
Now that your Registry is safely backed up we’ll finish off
with a quick peek at what’s inside; if you want to try your hand at a simple
editing exercise have a look at Tip Of The Week. Each branch of the tree is
known as a Hive, these contain folders called Keys and Sub Keys, which hold the
‘Values’, the actual data that makes the Registry tick. Values are stored in
the form of alphanumeric text and binary or hexadecimal code. If you like click
the plus sign next to one of the branches, try HKEY_CURRENT_USER because it’s
relatively short, a new branch opens and towards the bottom of the list you
will see Control Panel. Click the plus sign next to it and yet another branch
opens, select International and a set of icons appears in the right hand
window, along with the current Values. You can often figure out what they refer
to from the names, for example Locale 00000809 corresponds to the UK. If you
change the Regional Setting in Control Panel to another country the Locale
value will change; try it, but don’t forget to change it back!
Next week – Simple Registry tweaks
JARGON FILTER
BINARY
Numbering system with a base of 2, where values are
represented by zeros and ones
HEXADECIMAL
Numbering system used by computers, with a base of 16,
represented by the numbers 0 to 9 and the letters A to F
TWEAK UI
Unsupported Microsoft utility program for making detailed
changes to the way Windows looks and behaves by editing the Registry
TOP TIP
The name of the Registered Owner of your PC, which appears
on the front page of System Properties (right click My Computer and select
Properties) is often set by the vendor or manufacturer. You can easily change
it to your name by editing the Registry. Click on the plus sign next to
HKEY_LOCAL_MACHINE and then on the plus signs next to the following Keys:
Software/Microsoft/Windows and double-click on CurrentVersion. Scroll down the
list of items that appears in the right hand pane until you come to
‘RegisteredOwner’ double-click on the icon next to it and the Edit String dialogue
box opens, with the name that was entered when Windows was first installed.
Press backspace to delete the entry and type in a new name, click OK and exit
Regedit.
NEXT
|