wopclogo

The Windows Registry

adbanner

...your easy, authoritative guide to a well-oiled PC!

FAQs:

Is Google Chrome good for me?

Review of Mozilla CometBird

What is Maxthon? Is it good for me?

Is it time for Vista on older PCs?

Help! My PC does not start!

Help! My PC is running slow!

Help! My PC keeps Crashing!

Optimizing Windows Registry

What is Hard Disk Fragmentation?

Which is the Best Browser?

Do I buy a Notebook or Desktop?

What are the Best PC Specs for me?

Are my Virtual Memory Settings OK?

Is my Screen Resolution optimal?

Best Spyware Protection methods

Best Virus Protection methods

Best Spam Protection methods


WellOiled Links:

Site Map

Friends Listing

Our Security Policy

Testimonials we have received!


WellOiled Services:

Free and Paid Services

Chat with us!

Sign our Guestbook!

Join our Discussion Forum!

Fill in our Membership Form

Advertise with us: Banners & Links!

(Click the above links for answers. To return, click Go Top links)

PC Stretcher

Introduction to the Windows Registry - and - A WORD OF CAUTION before we begin!

This is an advanced topic, therefore at the very beginning, a word of caution from all of us at WellOiledPC: Editing the Windows Registry is something that even seasoned professionals shudder contemplating. NEVER attempt to edit your Windows Registry manually. We are DEAD SERIOUS – editing the Registry manually is a lot like performing an appendicitis operation on yourself!

We have written this article for those few of our members who have been asking us for a low-down on the Windows Registry. If you are not into tinkering with the innards of your Operating System (and even if you are, but do not have the time to read the full article), you are most welcome to go to the end of this article, where we have the results of a shoot-out of 10 popular Registry Optimizers and links to each of them. Many of these Registry Optimizers scan your Registry and show you the errors for free as well. Do not be surprised if the first scan turns up hundreds (no jokes, we DID mean HUNDREDS!) of errors! To fix the errors, you will naturally need to purchase the best Registry Optimizer...

Our advise for members who have expressed the desire to know more about the Windows Registry is the same too – Do read the entire article, but DO NOT TOUCH your Windows Registry! The article has been written keeping you in mind and we have given a lot of details too – but let your favorite Registry Optimizer automatically correct your Windows Registry errors for you!

Go Top

What is the Windows Registry?

All versions of the Windows Operating System contain what is called the Windows Registry. The Registry is actually a database, which Windows uses to store its own settings and your personal options. The settings and options it stores is comprehensive and includes;

Any change made by any user to his/ her Control Panel settings, File Associations or System Policies (even the Desktop Wallpaper!) are immediately updated in the Windows Registry. Any time you add a new piece of hardware (say a new Multi-function Device that replaced your earlier Laser Printer), the configuration is saved in the Windows Registry. Similarly, every time a new software is installed (or a software uninstalled), the changes are updated in the Windows Registry.

Why does Windows go to such lengths as to store each and every hardware/ software configuration change? Well, the answer is, it does this so that Windows does not need to do it every time it boots up/ runs the program! That would take a lot of time – instead, if it is stored in the Registry, Windows simply picks the required information from the Registry at a fraction of the time required to read it from scratch!


To sum up, the Windows Registry stores information about hardware and software configuration, so that Windows functions in the most efficient manner. It also stores user preferences, so that a user does not have to re-do his/ her preferences each time the machine is restarted. You can now see for yourself, just how important the Windows Registry is! It is so important that without it, Windows (and therefore, your Computer – Desktop or Notebook) would not even start up!


What is the Structure of the Windows Registry?

The Windows Registry is organized exactly as your Hard Disk – in hierarchical folders, each containing zero, one, or more files. However, you do not call them folders or files, instead, you call them Keys, Subkeys and Values.

Keys - Keys are the organizational units in the Registry. They are containers for either values or further subkeys. Subkeys may contain further subkeys. Thus, Keys contain subkeys or values, just like folders contain files.

Values - Values contain the actual data stored in a Key or Subkey. There are quite a few different types of values that can be stored in the Registry, with the most common ones being binary, strings, and DWORD values.

There are six main branches to the Windows Registry, with each containing a specific portion of the information stored in the Registry. These are as follows:

  1. HKEY_CLASSES_ROOT - This Key branch contains all your file association mappings. It  supports drag-and-drop features, OLE Information, Windows Shortcuts and the core aspects of the Windows User Interface.

  2. HKEY_CURRENT_USER - This Key branch links to the section of HKEY_USERS appropriate for the user currently logged onto the PC. It contains information such as logon names, desktop settings, and Start Menu settings of users

  3. HKEY_LOCAL_MACHINE - This Key branch contains computer-specific information about the type of hardware, software, and other preferences on your PC. This information is used by all users logging onto your computer.

  4. HKEY_USERS - This branch contains individual preferences for each user of your computer. Users are represented by a SID sub-key located under the main branch.

  5. HKEY_CURRENT_CONFIG - This branch links to the section of HKEY_LOCAL_MACHINE appropriate for the current hardware configuration.

  6. HKEY_DYN_DATA - This branch points to the part of HKEY_LOCAL_MACHINE, for use with the Plug-&-Play features of Windows. This is a dynamic section that changes as and when devices are plugged in or removed from your Computer.

Go Top

Registry1

Each main branch (denoted by a folder icon in the Registry Editor, as shown in the left pane here) is called a Hive. Hives contains Keys. Each Key in turn may contain either Sub-keys or Values. It is the Values that contain the actual information stored in the Registry. There are three types of values; String, Binary, and DWORD - the use of these depends upon the context.

A Registry Value is stored as one of the following five main data types:

  1. REG_BINARY: This type stores Value as raw binary data. Most hardware component information is stored as binary data and can be displayed in an editor in hexadecimal format.

  2. REG_DWORD: This type represents the data by a four-byte number and is commonly used for boolean values such as "0" for “disabled” and "1" for “enabled”. Additionally, many parameters for device driver and services are also this type. These may be displayed in REGEDT32 in binary, hexadecimal and decimal formats or in REGEDIT in hexadecimal and decimal formats.

  3. REG_EXPAND_SZ: This type is an expandable data string, that is, a string containing a variable to be replaced when called by an application. For example, for the following value, the string "%SystemRoot%" will replaced by the actual location of the directory containing the Windows NT system files. (This type is only available using an advanced registry editor such as REGEDT32)

  4. REG_MULTI_SZ: This type is a multiple string used to represent values that contain lists or multiple values, each entry is separated by a NULL character. (This type is only available using an advanced registry editor such as REGEDT32)

  5. REG_SZ: This type is a standard string, used to represent human-readable text values.

For example, here is the Registry key that controls what your Internet Explorer’s initial start page will be, HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\\Start Page

Looking at this Key’s components show the following:

HKEY_CURRENT_USER is the Hive that this key is associated with.
Software is a Key

Microsoft - This is a Subkey

Internet Explorer - This is a Subkey

Main - This is a Subkey

Start Page - This is the Value that the actual data is stored in. For this particular Value, the data will be the start page that you want Internet Explorer to use.

Go Top

To navigate your Hard Disk, you have Windows Explorer. Similarly, to navigate the Windows Registry, you have the program called Regedit.Exe. However, Regedit does not show the following kinds of Registry data types:

  1. REG_DWORD_LITTLE_ENDIAN - A 32-bit number in little-endian format.

  2. REG_DWORD_BIG_ENDIAN - A 32-bit number in big-endian format.

  3. REG_LINK - A Unicode symbolic link. Used internally; applications should not use this type.

  4. REG_NONE - No defined value type.

  5. REG_QWORD - A 64-bit number.

  6. REG_QWORD_LITTLE_ENDIAN - A 64-bit number in little-endian format.

  7. REG_RESOURCE_LIST - A device-driver resource list.

Where is the Registry File stored?

For Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003, the Registry files are stored in the following directories:

Systemroot\System32\Config
Systemroot\Profiles\Username

The names of the registry files are shown in the Table below:

Sam

Sam.log

Sam.sav

 

 

 

Security

Security.log

Security.sav

 

 

 

Software

Software.log

Software.sav

 

 

 

System

System.alt

System.log

System.sav

 

 

System

System.alt

System.log

System.sav

Ntuser.dat

Ntuser.dat.log

Default

Default.log

Default.sav

 

 

 

Go Top

What are the symptoms of a corrupted/ non-optimal Windows Registry?

The symptoms of a corrupted or non-optimal Windows Registry are very similar to that of virus or spyware attacks. If your Computer faces one or more of the following problems, it is advisable to check out for Viruses, Spyware as well as a corrupted Windows Registry:

  1. Your Computer takes too long to start up and/ or shut down

  2. You experience sudden drops in speed while working on your Computer

  3. You experience sudden crashes or a complete freeze of your Computer, while you work on it

  4. One (or more) applications suddenly refuse to open

  5. Your Computer takes too long to recognize add-ons and peripherals (such as your Micro Drive or Digital Camera or Printer). Or, it incorrectly identifies add-ons and/ or peripherals.

  6. Every time you insert an add-on or connect up a peripheral, you need to frustratingly go through the New hardware Setup screen all over again

Therefore, if your Computer comes out clean after checking for viruses and spyware, it is most probably your Windows Registry that needs cleaning up! 

Can I view my Windows Registry?

As briefly mentioned before, the program Regedit.Exe included with Windows enables you to view, search and edit the data within the Registry.

The simplest way to start Regedit.Exe – you will not find it in the Start/ All Programs Menu – is, to click on the Start button, select Run, and in the Open box, type “regedit”. You will see the following screen, with your Windows Registry open to view.

Registry2

An alternative Registry Editor (REGEDT32.EXE) is available for use with Windows NT/2000, it includes some additional features not found in the standard version, including; the ability to view and modify security permissions, and being able to create and modify the extended string values REG_EXPAND_SZ & REG_MULTI_SZ.

Regedit shows your Registry as a tree-like structure. The Registry Keys are shown on the left side (like folders in Windows Explorer) and Registry Values of the currently selected Key are shown on the Right side, just like Windows Explorer displays files.

Go Top

Again, like Windows explorer, click on the plus sign [+] to the left of any folder or simply double-click on the folder, to expand it. To display the contents of a Registry Key, you only need to click the desired key, with its Values promptly showing up on the right pane. You may add a new Registry Key or Value by selecting New from the Edit menu or by right-clicking your mouse while it is placed on the Registry Key. You may rename any value and almost any key with the same method used to rename files: right-click on an object and click rename, or click on it twice (slowly), or even press F2 on the keyboard while the Key/ Value is highlighted. Lastly, you can delete a key or value by clicking on it, and pressing Delete on the keyboard, or by right-clicking on it, and choosing Delete.

It is also possible to delete Registry Keys and Values using the .REG files. To do so, start by using the same format as the original .REG file and place a "-" symbol in front of the Registry Key marked for deletion.

For example, to delete the [HKEY_LOCAL_MACHINE\SYSTEM\Setup] key, the .REG entry would be:

REGEDIT

[-HKEY_LOCAL_MACHINE\SYSTEM\Setup]

The format used to delete individual values is similar. However, instead of a minus sign in front of the Key, the minus has to be placed after the equal sign of the Value. For example, to delete the value "SetupType" the entry would be;

REGEDIT

[HKEY_LOCAL_MACHINE\SYSTEM\Setup]

"SetupType"=-

A very useful feature of the Registry Editor is it's ability to import and export registry settings to a text file. This text file is saved as a .REG extension file. System Administrators use it when they want to set up a number of Computers in an office, all with the same Registry Settings

Go Top

Caution: We are merely describing the possibilities with RegEdit.Exe. We are NOT suggesting that you modify your Windows Registry on your own. Please do not make ANY changes to your Windows Registry: if you do, you are CERTAIN to be left with a Computer that will not boot up again! You may of course backup your registry and try out all these changes to the backup copy, if you are confident about creating a backup and working ON THE BACKUP COPY. Better to be safe than sorry!

Can I create a Backup of my important Windows XP files? Can I Restore from it, if my Registry gets corrupted for some reason?

Yes, this is quite possible and recommended as well. Microsoft Windows XP includes a useful feature known as System Restore. This feature enables a user to backup and restore their important system files from an earlier day and time. The usual times that a System Backup operation is triggered off are when you install a new piece of hardware or software, or when you patch your Windows.

Apart from getting triggered off automatically, you may also create a restore point of your system anytime you want to, using System Backup. We recommend you do this once-in-a-while!

To do a manual System Backup, follow the steps below:

  1. Click Start, Programs, Accessories, System Tools, System Restore

  2. Select the option to Create a restore point

  3. Click next and follow the remaining steps

To restore your Computer to an earlier point, follow the steps below:

  1. Click Start, Programs, Accessories, System Tools, System Restore

  2. Select "Restore my computer to an earlier time" and click next

  3. Select the day and the restore point you wish to restore and click next

Go Top

Note that both System Backup and System Restore are fairly long-winded operations. We suggest you get yourself your favorite drink, while your Computer Backs up/ Restores its vital files! Only, sit at some distance from your Computer – we do not want you to accidentally spill your drink on your Computer!

DC Software have a free product called Registry Editor Extensions (RegEditX), which is freely downloadable from http://www.regeditx.com. Currently, it is in Beta Version 2.

RegEditX

RegEditX is a lot more user friendly than Windows' native RegEdit. In the Screenshot, you can see the section under Current User/Software, with the Registry details of the software AntiSpywareBot being displayed in detail, in the right side of the panel.

On running RegEditX, do not be surprised if you find remnants of software that you had uninstalled months ago - if you have never used a Registry Optimizer, that is! Such left-over trash in the Registry slows down your Computer significantly!

Once again, we STRONGLY RECOMMEND that you do not tinker with your Registry - let specialized Registry Optimizers do it safely, skillfully and comprehensively for you!

Go Top

Do I really need to purchase a Registry Optimizer?

A Registry Optimizer solution is indeed a good investment. This is because;

  1. The Windows Registry is central to the functioning of your PC - any damage to it will at best slow down your Computer and at worst, trash it!

  2. If you need to ever repair a junked Registry, you will have to re-install Windows and thereafter, each one of your software packages and Peripherals/ Add-ons! This could take days and you may still end up a few applications short, as you may no longer possess their media (installation CD/ DVD)! A re-install of OS and applications is a horribly tedious task, one that we ALWAYS dread doing, for the sheer waste of time that it is!

  3. The Windows Registry is an ever-changing, never-constant file. Every time you change your wallpaper, screensaver, install/ uninstall a new program, purchase and use a new piece of hardware or software - even change the size of a window, your Windows Registry changes. Therefore, over a period of time, errors creep into the Windows Registry. Registry Optimization is NOT a one-time activity: like Virus or Spyware scans, this is also a continual activity! Therefore an investment of about US$ 30/- on a good Registry Optimization software is sure to save you many times the cost of the solution!

What are the Registry Optimizer solutions available today?

There are literally hundreds of Registry Optimizers - most of them shareware that costs under US$ 30, some of them even cheaper. We at WellOiledPC have tinkered around with so many of them that we have lost count... Some of them did correct Registry errors without giving us any noticeable improvement in Computer speed - which is okay, while a few of them resulted in missing applications and other problems, on rebooting - which is definitely not okay!

We list below in alphabetical order, the 10 that we believe are the best in the business.

We are dealing with extremely important information crucial for the functioning of your Computer, when we talk about your Registry. Therefore, we urge you to carefully go through the comparison chart!

Go Top

Comparison of Registry Optimizers

Product

Price (US$)

Free Scan

Registry Backup & Restore

Startup Manager1

Errors corrected

Scan & Fix Speed

Uninstall option2

Background operations

User friendliness

Scan Scheduler

Premium Booster!

26.95

Yes

All System files backed up!

Yes

Excellent

Excellent

Yes

Yes

Very friendly

Yes

Max Registry Cleaner

29.95

No

Complex Backup & Restore

No

Excellent

Fair

No

Yes

Unfriendly

Yes

Registry Mechanic

29.95

Yes

Yes

No

Poor

Excellent

No

No

Extremely friendly

No

Reg Sweep

29.95

Yes

Yes

No

Poor

Slow!

No

No

Very friendly

No

RegCure

29.95

Yes

Auto Backups

Yes

Excellent

Excellent

Yes

Yes

Very friendly

Yes

Registry Easy

34.95

Yes

Auto Backups

Yes

Excellent

Excellent

Yes

Yes

Very friendly

Yes

Registry Toolkit*

29.99

Yes

Auto Backups

Yes

Poor

Excellent

Yes

No

Extremely friendly

No

Registry First Aid

27.95

Yes

Yes

No

Excellent

Excellent

Yes

Yes

Very friendly

No

RegistryBooster

29.95

Yes

Yes

No

Good

Excellent

No

Yes