Learn How to Use the Windows Registry Editor (Regedit) in One Easy Lesson

A previous article discussed some basic facts about the Registry. In this tutorial, I’ll explain how the Registry Editor works and show how to tweak the Registry. Applies to Windows XP/ Vista/ 7/ 8.
Vic Laurie


Introduction

Many people like to configure Windows their own way and Windows is a system with numerous possible tweaks. Most of these tweaks are actually edits of the Registry. There are several ways to apply Registry changes but the true tweaker often likes to go to the source and tune up the Registry directly with the Windows Registry editor Regedit.

Regedit is one of those Windows programs that Microsoft doesn't say much about. It isn’t listed in the All Programs menu and the Help function doesn’t say how to use it. In fact, in Windows XP it warns, “Although you can use Registry Editor to inspect and modify the registry, doing so is not recommended, as making incorrect changes can damage your system.” Pretty off-putting but the caution is overdone. In Windows Vista/7, Microsoft relaxed a bit and included a few more details in Help but still not enough to let anyone understand how to use Regedit. If you are bold enough to go to Regedit itself, you will find it has its own Help menu with some instructions, but they are rather sparse.

This tutorial will flesh out what Microsoft has omitted and give you all the information you need to begin editing the Registry.

But first, I must make the rules of Registry editing clear.

Rules for editing the Registry safely

I have edited the Registry hundreds of times over the years and have developed the steps below for safe editing. I have messed things up once or twice but I have always been able to get back to the original system state without trouble because I followed the rules. Here are my five rules for safer Registry editing:

  1. The ironclad rule of Registry editing is that you must first back up the Registry. For many, making a System Restore point is the most convenient backup method. I also use the export facility of Regedit to make a copy of the Registry key that I am working on. Keep in mind that Regedit has no Undo function.
  2. Know how to restore a Registry backup. It can be as simple as running System Restore or merging a backup REG file.
  3. Make only one Registry edit at a time. Wait to see if everything works the way you want before making any more changes to the Registry. Don't forget that many Registry edits require that you log off or reboot before they take effect.
  4. Only use Registry edits recommended by known reliable sources. Many of the common recommendations on the Internet are useless or nearly so. And some are even harmful.
  5. Remember Rule #1.

     

With the precautions out of the way, we can get down to learning about Regedit.

How to open Regedit

A quick way to access Regedit that applies to Windows XP, Vista, 7, and 8 is the following:

  1. Open the Run box with the keyboard combination Windows key + r
  2. In the Run line, enter “regedit” (without quotes)
  3. Click “OK”
  4. Say “Yes” to User Account Control (Windows Vista/7/8)

The structure of the Registry as presented in Regedit

Using Regedit requires some knowledge of the basic structure of the Registry. I would go further and say I think it is worthwhile to take a look at the structure of the Registry even if you never intend to change a single comma in it. Total ignorance about what is actually in the Registry allows the imagination to assign mysterious and fearsome properties to something that is actually just a database. You may not remember any details, but having once seen what is actually in the Registry you will be psychologically better prepared to do the type of Registry operations that everybody should know – backing up and restoring.

Types of Information in the Registry

The information that the computer system needs to have is divided into two main categories. One is general information about the computer itself. These are settings that apply system wide and include the hardware on the system. This is named the Local Machine. The other general category consists of settings that are specific to each user account and is labeled Users. The particular user who is logged on is called the Current User.

The Hierarchical Tree Structure

Information in the Registry is presented in a tree-like system akin to folders and files. In the Registry, the containers for information are called "keys". These are analogous to folders. Keys can have subkeys just as folders can have subfolders. The name of data that is contained in a key is called a "value". This is something analogous to a file name. The actual data can have several formats and may be a string, a number, or a series of numbers.

Just as the computer file and folder system has a root (usually a hard drive) the Registry has root keys at the top of the hierarchy of keys and values. I have mentioned the two general categories of information and these constitute two root keys. Unfortunately, we now have to deal with some Microsoft jargon. Table I shows the names that Microsoft uses. The names of root keys have "HKEY" tacked on the front and these keys are often called "hives". Although five root keys are used, three of them are really just subkeys or combinations of subkeys of the two main keys, HKLM and HKU. The additional root keys make programming easier.The abbreviations that are given are often used in writing scripts and INF files.

Table I. Root keys or Hives
Keys Abbreviation Description
HKEY_CLASSES_ROOT HKCR Stores file association and COM object registration
HKEY_CURRENT_USER HKCU Stores data associated with the account currently logged on
HKEY_LOCAL_MACHINE HKLM Stores system-related information
HKEY_USERS HKU Stores information about all the accounts on the machine
HKEY_CURRENT_CONFIG HKCC Stores information about the current machine profile

 

Using Regedit

Regedit is a two-pane interface with keys in the left pane (key pane) and value names with the corresponding data in the right pane (value pane). The setup is not unlike Windows Explorer with keys analogous to folders and values analogous to files. An example is shown in the figure below. This is from Windows 8 but XP/ Vista/ 7 is very similar.

Figure 1. Registry Editor (Regedit)
Registry Editor

The bottom of the window for Regedit shows the path of the currently highlighted key as can be seen in the figure above. This is an example of typical Registry address although the leading "My Computer" is normally omitted.

Also listed in the right or value pane is the type of data contained in a value. There are a number of formats that data can take and the usual ones that most PC users will encounter are given in Table II. I have omitted the more esoteric types. The three listed in the table constitute the vast majority of all Registry entries. Other data types are described at this Microsoft link.

Table II. Common Registry data types
Data type Description
REG_BINARY Binary data . Usually in hexadecimal notation. An example is 0xA8
REG_DWORD Double word (32 bits). Can be edited in either hexadecimal or decimal
REG_SZ A string. Figure 1 shows examples in the right pane.

Menus in Registry Editor

Regedit has some of the same menus that are so familiar throughout Windows. The menu bar can be seen near the top of Figure 1. Shown below are two commonly used menus.

Figure 2. File menu Figure 3. Edit menu
Registry File Menu Registry Edit Menu

The File menu has the functions "Import" and "Export" that can be used to backup and restore individual Registry keys with REG files. The next section will have more detail about this important function.

As you would expect, the "Edit" menu is where commands are located for making changes to the Registry. Keys and values can be deleted, added, or renamed. (Permission settings on keys can also be edited but that is an advanced subject beyond our scope.) Another two very useful functions are "Find..." and "Find Next". The Registry has thousands of keys and these search functions are very necessary. Unfortunately, the search function cannot find binary values or REG_DWORD entries. It searches key names, value names, and string data.

The Edit menu also contains a useful entry "Copy Key Name" that sends the path of the key to the clipboard, Since path names can be quite long, this can be very useful.

Favorites menu in RegeditAnother menu that can be quite useful is "Favorites". If you find that there are is a certain key that you modify often, this key can be added to the "Favorites' list for easy access. The example of a "Favorites" menu shown on the right contains three favorites. Note the names have been chosen by this user and can be anything that is a convenient reminder. They actually refer to specific Registry keys, which can have very long path names.

Backing up and restoring Registry keys with REG files

Here is how to back up a key (remember, a key is something like a folder):

  1. Open Regedit and highlight the key
  2. Open the "file" menu and click "Export". An alternative method is to right-click the key and choose "Export"
  3. A standard dialog box for saving files will open. For most cases, you will choose to save as a registration or REG file. This is a text file with extension .reg that is a copy of the highlighted Registry key
  4. Save it someplace safe

Note that whole keys and not single values are involved. To restore a Registry key, you can use the "Import" function. However, it is easier to merge REG files into a Registry by right-clicking the file and choosing "Merge". On many machines the default left double-click on a REG file will also create a merge. I prefer to change the double-click action to "Edit" so that accidental mergers do not happen. Notice that I use the word "merge". REG files do not replace keys but add to them, something to keep in mind. Anything extra that you may have added is not deleted. Some experienced PC users prefer to do any actual editing in the exported REG file and then to merge the edited file. This prevents accidentally doing something to the wrong key.

Keep in mind that Regedit has no "undo" function. What's done is done.

Editing the Registry

There are many useful adjustments to the Windows configuration or behavior that can be made by simple editing of the Registry. Unless you are a trained IT professional, you should probably limit Registry editing to one or two values at a time. I will limit this discussion to this type of straightforward scenario.

Dialog box for Edit StringFor the most part, direct Registry editing means changing a value. Highlight the value in question in the right-pane of Regedit. Then choose "Modify" from the "Edit" menu or right-click the value and choose "Modify" from the context menu. For strings, a box like the one shown in the nearby picture will open. As a specific example, consider the last value in the right-pane of Figure 1. The time that the system waits for a service to close at Shutdown is controlled by the entry for the value, WaitToKillServiceTimeout. The value is in milliseconds and the default is 20000 (20 seconds). To make things close up more quickly, you could change the value to 10000 (10 seconds). Or you might need to make it longer for certain systems. Enter the desired string in the line "Value data" and click OK.

Dialog box for DWORDA great many Registry values are strings but another type of data that is common is the "DWORD". A slightly different box will appear if you are editing a REG_DWORD value. The figure on the left shows the appropriate box. Note that when entering a DWORD value, you need to specify the base for the number. Be careful to be sure that you have chosen correctly between hexadecimal and decimal. You can enter either but the number that you enter must correspond to the correct value for the chosen base. In the example here, the decimal number "96" would have to be "60" if hexadecimal were picked for the base.

And so we come to the end of the unveiling of the mysteries of the Registry. Go forth and edit well but carefully—Vic Laurie

Share this
4.08228
Average: 4.1 (158 votes)
Your rating: None

Comments

by Jojo Yee on 23. November 2010 - 8:38  (61545)

Thanks a lot Vic for this clear guide as I sometimes need to deal with the registry. I knew your Rule no. 1 but at one time I forgot your Rule no. 5, that resulted me in taking a longer process of restoring the system :)

by v.laurie on 23. November 2010 - 17:44  (61568)

Thanks, Jojo. I appreciate that you spent the time to read it. Let me know of any improvements you want to suggest.

by Anonjeff (not verified) on 24. November 2010 - 0:18  (61589)

thanks vic

by Anonjeff (not verified) on 24. November 2010 - 0:28  (61590)

Thanks Vic. A very daunting subject to try and explain. My question is this regarding 1402 errors with no registry permissions. Do you have or know a simple way of explaining them? I have given up on MS office ever getting installed on my computer. The patches and MS Fixits dont work for me. The helpdesk is too complex. Would really appreciate any tips you may have on the subject.
Respect

by v.laurie on 24. November 2010 - 0:49  (61591)

The best I can do is to refer you to http://support.microsoft.com/kb/838687/en-us

by Jorpho (not verified) on 24. November 2010 - 17:13  (61621)

Eh. It's good to demistify the process, but really, there are perfectly good tweaker programs (such as TweakUI or X-Setup) that are perfectly adequate for just about every tweak I'd care to make. "But you don't know what those programs are doing!" is the response. To which I reply, you don't know that some registry tweak you've found online somewhere is any good either.

by v.laurie on 24. November 2010 - 17:39  (61622)

You are certainly correct that there are some useful tweaking programs. It is also true that these programs are all that many people will want to use (or none at all). Nobody says you personally have to edit the Registry or even read about it. As the article's title says, it's a lesson on how to use the Registry Editor. It's intended for those who might like to find out about this subject. There are such people even if you aren't one of them.

by Quasimodo on 26. November 2010 - 1:08  (61659)

Very clear and well laid out. The only suggestion I can make is to give an example. If there was something fairly common what you could change and see the change and you used it as an example, it would help get people's feet wet, as it were. Even without my suggestion, it is a great article.

by v.laurie on 26. November 2010 - 1:33  (61661)

Thank you for your kind comments. I sort of indicated an example with the "WaitToKill" figure. Future tips will be including suggestions for Registry edits. Perhaps that will help fill in the lack of examples in the article. The article has laid the groundwork on which I can build.

by Siegfried (not verified) on 28. November 2010 - 5:44  (61717)

I got a problem with the merge process, does it not mix two strings together ?
Why not export the string twice, then modify one of them, delete the original one and merge the modified one. In case it didn`t work delete that string again and replace it with the 2. saved one and you get the exact original one back.
I for one use the small program ERUNT to back up the registry to restore if needed, only because I didn`t now your way of doing it.

nice article, I sure would like a replay thank you

by okwhen on 28. November 2010 - 7:10  (61722)

This is the site that I learned from www.mdgx.com/reg.htm. To date, while perusing the web I have never encountered any articles or sites that even come close to the detailed information provided. This includes the first book I purchased “Windows 98 Registry Handbook” A Guide for Power Users by Jerry Honeycutt. I actually wrote Jerry and explained I discovered information not discussed in his book on this site and he stated Windows XP is out now and he is moving on. I must say Wikipedia also provides resourceful information https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry.

by v.laurie on 28. November 2010 - 23:38  (61753)
by MisterEnglish on 30. November 2010 - 17:26  (61833)

I've always been interested in what the registry does, and even ensure that it's 'cleaned' regularly by a registry editing program, but I've never even looked at the registry itself: being concerned that even looking at it might create a disaster :)
So, I must say that the above is a pretty good overview of what it's all about. I can't really understand it properly, mainly because I've had no formal training of any kind, and so don't even know what to call the various boxes that open up when I'm working on the computer - which makes it difficult to discuss problems that arise with other people - and don't know much of the terminology involved. Even the reference to a COM object above leaves me cold. Command? Common? whatever.
However, having read it through, even though I'm thoroughly confused, I will be having a look at the Registry. This, despite that I have no ideas for any editing at the present time, but just to familiarize myself with it.
Perhaps you'll forgive me if I tell you I'm 71, and didn't ever touch a keyboard of any kind until I was well into my forties. I find that learning about computers, as with many subjects, is best started when very young. That way you learn from the ground up. In my case, my wife - who's much younger than me - bought a personal computer about 25 years ago, with KB of memory, and then left me to play with it. She's the educated one - doing her doctorate at the time (which she unfortunately had to abandon because her best friend, who was going to help her with her Stat's, died in a car crash).
To sum up, this is by far the best - really the only - explanation of the computer registry, and there's a chance that before I go off in a puff of smoke, I'll maybe edit it a little ...

Graham Hyatt (MisterEnglish)

by mrbuckingham on 15. January 2011 - 6:38  (64590)

I too use ERUNT and would highly recommend it to anyone. Some will probably think what I do is overkill, but I have ERUNT scheduled to run every 4 hours, along with Cyber-D's AutoDelete to delete anything over 5 days old from the ERUNT backup folder.

I'm forever installing and trying out new software, fiddling with settings, messing with the registry and ERUNT has come to the rescue more than once.

by Kathiresan (not verified) on 5. August 2011 - 6:17  (76950)

Even after uninstalling some programs, some folders with their names appear in the Registry list. Should I delete them? If yes, how to do that, just right click and delete??

Thanks

by v.laurie on 5. August 2011 - 13:24  (76968)

It is common for remnants of programs to be left in the Registry after they have been uninstalled. That is why I use a good uninstaller program. I can't say whether it is safe to delete your folder references without actually looking at your system but I suspect it is OK. If you are going to delete something, back up first. Make a system restore point, for example. In any event, a few stray references in the Registry are normal.

by Ruth Ann Schoen (not verified) on 31. August 2011 - 18:19  (78763)

I would like to print a copy of this lesson, so I can use it to follow the instructions on how to get to my registry, please advise

by v.laurie on 31. August 2011 - 18:34  (78764)

All common browsers have a print function.

by Leandro San (not verified) on 16. May 2012 - 0:23  (93522)

How to find the OE store folder in the Windows registry?
Can I change the folder via the registry?

by v.laurie on 16. May 2012 - 1:03  (93524)

If you want to move the OE store folder, the best place to get help is in the Freeware Forum, where many knowledgeable people can assist you.

by Osifo Omoruyi (not verified) on 19. July 2012 - 16:17  (96401)

well articulated. I really love this article
I just have to go through it again to know it more

by Phil from Buffalo (not verified) on 8. August 2012 - 15:27  (97401)

HERE IS WHAT I WANT TO DO:
Exclude a specific folder on my win7 desktop from the windows backup.

HERE IS WHAT I FOUND ON THE WEB:

Exclude specific folders from system restore backup

When using system restore to back up your data, you might want to make sure that you are not wasting backup space by saving useless folders that may include temp file or other non-necessary files. To exclude folders, follow the directions below.

1) Open Regedit and navigate to HKEY_Local_Machine\System\CurrentControlSet\Control\BackupRestore\FilesNotTobackup

2) Choose Edit, new, multi-string value

3) Give a descriptive name

4) Double-click the value and input the full folder path you wish to exclude and click OK

System restore will no longer monitor this folder and backups will not be made of the files contained in it.

QUESTION, CAN ANYONE ADD MORE DETAIL TO THE ABOVE EDIT ?

Thanks

by L. Mattair (not verified) on 10. October 2012 - 18:36  (100610)

The article was both informative and very detailed. However, it does not help my situation. I need to export a key and name it "RegBackup" and then save it to C:\drive as backup. The problem is that in my windows 7 Home Edition, it does not say "export"...the only options are: Modify, Modify Binary Data, Delete, Rename,New, Permissions, Find....which do I use that "exports"?

by v.laurie on 10. October 2012 - 20:55  (100612)

You are looking in the "Edit" menu (figure 3 above). You need to look in the "File" menu (figure 2 above).

by MARY KRIS D. FERRARIZ (not verified) on 12. October 2012 - 1:07  (100663)

I used regedit to change my desktop background but it did not worked. I'm using Windows 7 starter. At first, my background is the windows standard background, then i used regedit to change it but it only change it to plain pink color background. I tried to change it again but I can't.

Somebody help me turn my setting back.

by v.laurie on 12. October 2012 - 1:11  (100664)

Did you back up the Registry?

by frankatmk (not verified) on 30. October 2012 - 22:38  (101624)

Thank you for your very informative and helpful article.
For ages now I have wanted to get rid of the pre-installed Oberon media files, having mistakenly uninstalled the install/uninstall file (yes I know lol)
Also all the languages that come with windows (7 in my case) that are not needed, slowing up scans etc, i'd give them the elbow straight away,, maybe you could do an example of that on here?
Thanks again and best wishes to all

by Aman (not verified) on 16. November 2012 - 14:06  (102404)

i am delete some registry key in location HKLM\SOFTWARE\MICROSOFT\.NETFRAMEWORK\INSTALLROOT,How is it reinstall it??
window-7 ultimate 32bit

by MidnightCowboy on 16. November 2012 - 14:38  (102406)

Sorry, but we do not provide individual support in the comments. Please register and post here in our forum. MC - Site Manager.

http://www.techsupportalert.com/freeware-forum/general-computer-support/

by sudharson (not verified) on 29. November 2012 - 2:17  (103038)

i want to disable the audio in registry but the same time the audio supported games should be run............ how to do this?

Gizmos Needs You

Gizmo's Freeware is Recruiting

 We are looking for people with skills or interest in the following areas:
 -  Mobile Platform App Reviews for Android and iOS
 -  Windows, Mac and Linux software reviews       Interested? Click here