WHAT IS
THE REGISTRY
by Lee Alexander
In
Windows operating systems, the Registry is a special file that holds
structured data about the system's hardware, user preferences, and
other configuration data. The purpose of the registry is to reduce
the number of earlier configuration files: AUTOEXEC.BAT, CONFIG.SYS,
WIN.INI, and SYSTEM.INI. Viewable as plain text, it was easy to
modify these files and cripple the operating system. In Windows
XP these files are eliminated.
There's
a good reason why Microsoft made it inconvenient to play in the
Registry. My first piece of advice is “ leave
it be .” Unless there is a real Registry problem, or your
curiosity surpasses that of a cat, it is best to let the Windows
operating system do its own house-cleaning and maintenance of this
entity.
How
to Get There
You
will not find a registry editor under system tools, like Disk Cleanup
and Disk Defragmenter. Exploring the Registry can be a highly dangerous
pursuit. It is a tightly constructed database and an inadvertent
entry could cause your system to not even boot up.
If
you do a search for Backup in Help and Support, you will find rather
confusing text with a lot of cautions. Any mention of the Registry
in literature or popular magazines begins with an admonishment to
backup the Registry before proceeding any further. Registry entries
must be very specific in format; a misplaced character can render
your system inoperable.
An
excellent utility for backing up the registry is ERUNT (Emergency
Recovery Utility for NT systems) by Lars Hederer. You can find it
at www.larshederer.homepage.t-online.de/erunt. Be sure to read the
text file before you use the program. A companion utility, NTREGOPT,
can be included in the download. That name stands for NT Registry
Optimizer, a compactor utility.
What
REGEDIT shows-
The
structure of the registry is broken up into what are called hives.
The five principal hives are:
Below
is a screenshot of the expansion of one of the hives
Below
are the data for a backup program (not a Registry Backup program)
I downloaded. The key, SN (serial number), was added when I paid
for an expanded version of the free program.

This
screenshot shows the Registry entries for another free utility.

Note
the complex data field for the application identity key. Corruption
of a single digit, accidentally or intentionally, would disable
the program.
Let's
look at the functionality on the hives:
HKEY_CLASSES_ROOT - associates filename extensions with applications.
HKEY_CURRENT_USER - contains information for the presently logged
in account
HKEY_LOCAL_MACHINE - defines the state of the system. It includes
data on bus types, system memory (RAM), installed hardware and software,
and security settings.
HKEY_USERS - entries are global, that is, they apply to all users.
HKEY_CURRENT_CONFIG - the data refers to hardware not specific to
any account.
HKEY_DYN_DATA – DYN refers to dynamic or changing; contains data
about presently installed PnP (Plug and Play) devices.
Examples
of Registry Editing
You
must be very careful to be in the correct hive when making changes
or adding new entries. Using the Find function in the Edit menu
may not take you to the correct hive. The bar at the bottom of the
Registry window will give you the full path to the registry key
selected. Before you edit a key or create a new one, be sure to
make a written note of the exact spelling and value you apply.
The
first example is rather trivial and intentionally so. It simply
moves your wallpaper (if you use such) to give a clear area for
desktop icons. For most systems the keys will not exist in their
version of the Registry, giving us the opportunity to create a key
from scratch. The key values will set the origin in the X. and Y
dimensions for the position of the wallpaper. The values are in
units of pixels, measured from the upper left corner of the screen.
Since it's your Desktop, we want to be in the hive of the current
user. Starting in HKEY_CURRENTUSER | Control Panel | desktop, create
a new key by right clicking in the right hand pane, expanding New
and selecting String Value. Enter WallpaperOriginX as its name.
Double-click this new key and enter a value, say 100, for the pixel
displacement from the left edge of the screen. Repeat the above
for a key entitled WallpaperOriginY and use a value of 50 pixels
for the vertical displacement.
Minimize
the Registry to the Taskbar. There is no need to do a Save operation
and that's part of the danger, your changes take immediate effect.
On your Desktop, right-click and select Properties to refresh the
display when you click OK. If the display is not to your liking,
return to the Registry, right-click the appropriate key, select
Modify and enter a new value.
The
next example reduces the default times to close applications. Windows
is rather patient when it comes to “hung” programs, the interval
before the End Program dialog box appears. Again we will confine
our changes to the current user by starting in HKEY_CURRENTUSER
| Control Panel | desktop.
We
could do away with the End Program dialog box entirely; however,
this could stop a process (as opposed to application) prematurely
with undesirable results. The key to stay away from is AutoEndTasks;
leave it with the value of zero. A key we can modify is the HungAppTimeout,
whose default value is 5000 milliseconds or 5 seconds. You can safely
reduce this to one second or less but avoid zero. The second key
in this category is WaitToKillAppTimeout; default value 20,000 ms
or 20 seconds. You can safely reduce this timing to a reasonable
few minutes.
Another
recommended Registry tweak is a key to remove from memory DLLs (Dynamic
Link Library) used by an application when the application is closed.
Most versions of the Registry will have the key; if not you can
create as described above. The key is AlwaysUnloadDLL and its default
value should be set to 1 (for true). The location is HKEY_LOCAL_MACHINE
| Software | Microsoft | Windows | CurrentVersion | Explorer.
Registry
Cleaners
At
the March 14, 2006 meeting of the Macon Users Group, the presentation
was cleaning and optimizing your systems software. One of the topics
was Registry cleaners. An article on the subject can be found on
the Muggings page of the club's web site, www.maconusersgroup.org
.
The
following information is available in the article and I repeat the
sources as a convenience. http://articles.networktechs.com/138-p1.php
- a review of 5 free programs.
For
compacting Registry, try RegCompact.net v1.8 from http://experimentalscene.com/download.php
.
CCleaner.exe
from www.ccleaner.com -
multipurpose cleaner.
RegShot;
find it at http://regshot.yeah.net/
- takes a before/after snapshots and records a log of changes.
Conclusion
In
good conscience, I must repeat my warning to enter the registry
with extreme caution. That is not to say it should be a grand unknown
of the operating system, we have plenty of those in Windows OS's.
This article has attempted to take some of the mystery out of a
very complex and sensitive database. Random excursions can have
high consequences, to the point where the only solution is a complete
reinstallation of Windows.
In
addition to cosmetic appearance and the management of applications,
the Registry also holds many parameters for Services. Deletion or
corruption of a Service could also render your system inoperable.
The examples provided were gleaned from computer magazine articles
written by experts. They were in no way found by yours truly "just
playing around." We may do that in an application, where we
could uninstall and reinstall the program; but never in the Registry.
|