Saturday, October 15, 2005

An introduction to the Windows Registry

For most of us the Registry is like the head gasket in our cars: we know it's there, that it's very important and that it's not something to be played with. Just as a car with a faulty gasket doesn't go very far, a corrupted Registry can stop Windows from even starting. But if you know what you're doing, the Registry can be a valuable ally in the cause of effective computing.
This guide will show you what you can safely edit to customise your computer. That said, be aware that the Registry is not a Windows element to be trifled with. Making the wrong changes can damage a PC so don't attempt any modifications until you have read this entire guide.
Even if you aren't confident enough to make any changes for now, we suggest that you read on, as understanding how the Registry controls your PC will further your all-round computer knowledge and could help you fix problems in the future.
Not all change is goodBefore we proceed, let's expand on our warning about making Registry changes. Most of the information contained in the Registry is essential to the smooth running of Windows, and changing or deleting values can stop your computer from running altogether.
The other important thing to remember is that any changes you make to the Registry happen as soon as you enter them. The Registry is not like a Word document where you have to select Save, and there is no Undo feature either. This is not the place for idle tinkering but there is an insurance policy that's easy to take out. As with other kinds of data, Registry information can be backed up, creating a copy that can be restored if problems arise.
In fact, the Registry is so important that Windows automatically makes a backup every time it starts. Windows can automatically fix some problems using this backup but most changes you make will need to be fixed by you.
The easiest way to protect yourself before making changes is to create a System Restore point, which will make a single, unchanging record of the Registry at a certain point that you can return to if you need to.
You might also want to record any changes you make to the Registry using a pen and paper. You may wish to reverse some adjustments even if the computer hasn't stopped working altogether, and it is far easier to do so by simply referring to a quick note than having to restore the whole Registry.
What is the Registry's job?With all these warnings you're probably wondering what the Registry actually does and why anyone would want to tinker with it. It's a central record of all the settings and information relating to Windows and the software and hardware you have installed on your computer. Before Windows 95, this information was kept in lots of different text files. They were easy to edit but you had to find them first and this often created problems when programs tried to interact.
One benefit of the Registry is the Add or Remove Programs feature, which is part of Control Panel under the Start menu. When you install software it makes a record in the Registry so that it appears in Add or Remove Programs as part of a single list.
What does the Registry look like?The Registry is stored on your hard disk in several files but the only way to look at it and make changes is to use the Regedit program. To access this, click on the Start Button and then on the Run option. Type regedit into the box that appears and press Enter. This will launch Regedit and you will now have your first sight of the Registry.
The Registry is organised much like the files on a disk and will look familiar if you have ever used the Folders view in Windows Explorer. In the Registry, however, these folders are called keys. To open a key, simply click on the small plus (+) symbol next to it. You will then see that each key contains either more keys - called subkeys - or values.
The keys are organised logically but there are thousands of them, which can be daunting the first time you sneak a peek at the Registry. To simplify things, be aware that there are five root keys and these are the basic building blocks of the Registry.
Values refer to the individual settings in the various keys and are therefore customisable. Displayed by name in the left-hand side of the Regedit window, they also show the kind of data they contain and the data itself. Don't worry about what kind of data is being used as this will be obvious from the data itself or will be explained during the editing process.
Making changes to the RegistryYou will have already made changes to the Registry but only by proxy using Control Panel or installing other software. Third-party software can also do this but you should only ever use software you trust. Letting an unknown application edit your Registry can leave the door wide open to spyware.
Some of the available software offers settings that you will not find anywhere else. One such program is Registry Mechanic. Other utilities, such as Norton SystemWorks, can scan the Registry for values that are no longer needed and remove them. The bigger the Registry the slower your computer will become, so SystemWorks can be very useful.
Spyware often installs values in the Registry to make sure that it's launched to monitor your computer when Windows starts up. When looking for advice on how to remove these programs you may be told to edit the Registry. Always make sure that the advice is coming from a trustworthy source such as Registry Guide for Windows or Systweak.com.
Sometimes the spyware also installs a small program to monitor the Registry and replace keys that you delete, so you should use software such as Spybot Search and Destroy to clean your computer entirely.
What you can do with the RegistryIf you know the basic workings of the Registry you can quickly tweak the way your computer works to suit your individual needs. You can also set Favorites in Regedit just as in Internet Explorer. If you are changing a setting that may need tweaking, such as the thumbnail example below, you can use this feature to quickly return to the value you changed.
To set a Favorite, click on the key, then on the Favorites menu and select Add Favorite. Give the Favorite a name and click on OK. To return to the key, you can now simply select the Favorite from the Favorites menu.
Notice the difference between decimal and hexadecimal values, as the same figures in each will produce different results. All the examples here use decimal values.
Take control of thumbnailsWindows can display images as thumbnails in the Windows Explorer window. If you find that the size or quality of these thumbnails is not to your liking, you can use the Registry to change this. First make a backup by creating a System Restore point. Now open Regedit using the process outlined earlier and open the following key by clicking on the '+' symbol next to it.
Now right-click on the Explorer icon, select New and then click on DWORD value. Enter the text ThumbnailQuality where NewValue1 appears. You should be able to just type over the original name; if not, click on the new key and press F2 to edit the name. Right-click on ThumbnailQuality and select Modify. In the window that appears, type a number between 50 and 100 to specify the quality of the thumbnail. The default is 90. The smaller the number, the faster the picture will appear but the lower its quality will be. Click on the option labelled Decimal and click on OK.
To change the size of the thumbnails, right-click on the Explorer icon, select New and then click on DWORD value. Name the new value ThumbnailSize, right-click on it and select Modify. Enter a number to set the number of pixels across you wish each thumbnail to be. The default measure is 96. Click on the option labelled Decimal and click on OK. You may need to restart your computer for both of these changes to take effect.
Clear websites from History in Internet ExplorerAlthough you can delete the History list of the websites that you have visited from Internet Explorer, it will still save them and automatically enter them when you start typing similar names in the address bar. This list is held in the Registry and you can delete it if you want to.
Click on the Start button, then on Run, type regedit in the window and press Enter. Now find the key: 'HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs'. In the right-hand pane you will see a list of all the websites that you have visited. To remove websites from this list, click on each entry and press the Del key. Click on Yes and the entry will duly be removed.
Block Task ManagerThe Task Manager is very useful for dealing with software that has crashed, but sometimes you will want to prevent people from using it to keep them from stopping an essential program, such as a virus scanner you may be running. Be aware, though, that because you can stop any program that is running, it is very easy to crash Windows inadvertently. You can stop people from accessing the Task Manager by changing the Registry in the following way:
Click on the Start button, then on Run. Now type regedit in the window that appears and press Enter. Go to the key: 'HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Policies\System'. You may need to create the System key. To do this, right-click on Policies, select New and then click on Key. Give the key the name System.
Right-click on the System key, select New and then click on DWORD value. Give the value the name DisableTaskMgr. If you cannot enter the name, left-click on the new value and press F2 before typing the new name. Right-click on it and select modify. Enter 1 in the value data box in the window, select the decimal option and click on OK.
Now if someone tries to start the Task Manager by pressing Ctrl+Alt+Del, they will get a message telling them that it has been disabled. If you have more than one user account on the computer, you will have to repeat this procedure while logged into each account.
Carefully does itWe've shown just a few examples of what you can do with the Registry. As you learn more, you may find that knowing about how your computer interacts with its Registry is a valuable tool that will boost your confidence in the long term.
We hope you will be able to gain a further insight in to your computer by following this guide. Just remember to always treat the Registry with the utmost respect and be very careful when changing things. Always make a backup first and only change or add values when you know exactly what they are and what they do.
Find out moreThere are plenty of websites with advice on how to edit the Registry and what can be changed with it. If you're unsure about a particular change, you can check with other users on internet forums such as the Computeractive forums here.
For lots of examples of changes you can make to the Registry, check out WinGuides Network for Windows. Each tip has a screenshot of the keys and values you need to change and what they should look like. You can also download the WinGuides Tweak Manager from this website, which will apply all of these changes without needing to use Regedit.
If you're feeling more confident, take a look at The Elder Geek on Windows XP. This site has plenty of suggestions and, even if you are not looking for specific Registry edits, you may find changes you wanted to make but didn't know how to.

No comments: