How to work with the Registry in Windows Vista

an article added by: Don Jefferson at 06212007


In: Root » Computers and technology » Windows Vista » How to work with the Registry in Windows Vista

French Spanish Portuguese Italian German Japanese Chinese Korean Russian Arabic

This article shows you how to work with one of the most mentioned but least understood components of Windows - the Registry, the huge database of Windows’ settings for your computer’s hardware and software. The article starts by discussing what the Registry is, what it does, why you might want to work with it, and what the dangers are of making changes to the Registry. It then explains the step you must take before you make any changes to the Registry: backing up the Registry so that you can restore it if something goes wrong. After that, the article shows you how to use Registry Editor to examine the contents of the Registry, find what you’re looking for, and make changes. It mentions several Registry changes that you may want to make to change how Windows Vista behaves. It concludes by showing you how to goose the Registry so that you can crash your computer with two keystrokes.

What Is the Registry and What Does It Do?

In Windows, the Registry is a hierarchical database of all the settings required by your installation of Windows and the programs you’ve installed. These settings include information on the hardware installed on your computer and how it’s configured, all the programs and their file associations, profiles for each user and group, and property settings for folders and files. The Registry stores the information needed to keep your computer running. Windows itself stores a huge amount of information in the Registry, and each program you install stores information there too. You can store information in the Registry yourself if you want to, although unless you’re creating programs, there’s not much reason to do so. The number of entries in the Registry depends on the number of users of the computer and the software installed, but between 50,000 and 100,000 entries is normal. This multitude of entries makes browsing through the Registry practical only for those with serious amounts of time weighing on their hands. Even searching through the Registry can be a slow process, because many of the entries contain similar information. Windows 95 introduced the Registry, and all 32-bit and 64-bit desktop versions of Windows since then have used the Registry. In Windows 3.x, information was stored in initialization files - INI files for short. For example, Windows configuration information was stored in files such asWIN.INI and SYSTEM.INI. Most programs typically created configuration files of their own. Centralizing all the information in the Registry has two main advantages. First, all the information is in a single location. Second, you can back up the Registry though most users forget or fail to do so and restore it. This centralization also has a disadvantage: damage to the Registry can cripple Windows completely.

Why Work with the Registry?

Normally, you don’t work directly with the Registry - most of the time. In theory, you should never need to mess with the Registry. That’s why Windows provides no direct way from the user interface to view the Registry and change its contents. If you want to explore and change the Registry, you need to deliberately run the Registry Editor program, which is tucked away in a safe place where no casual user should stumble across it. Most of the information that’s stored in the Registry you’ll never need to change. Those relatively few pieces of information that Windows is happy for you to change are accessible through the Windows user interface, which provides you with an easier - if more restrictive - way of changing them than working in the Registry. For example, the settings in Control Panel applets store most of their information in the Registry, so you could edit the Registry and change the information there. But for all normal purposes, you’ll do better to work through those Control Panel applets and let them set the values in the Registry for you. Control Panel is designed to be easy to use, while the Registry isn’t. Control Panel shows you your options in mostly intelligible ways; the information in the Registry is arcane when not incomprehensible. And Control Panel seldom makes mistakes in translating your choices into hexadecimal and binary, whereas the Registry will happily accept input that will instruct Windows to disable itself. That said, sometimes you may need to access the Registry to change a vital piece of information that you cannot change through the user interface. Sometimes you’ll need to access the Registry because something has gone wrong, and you need to change an entry manually. But more often, you’ll hear about a cool tweak that you can perform by entering a new value in the Registry or by changing an existing value. You can also use the Registry to store information of your own that you want to have available to Windows or to the programs you use. You might want to do this if you write your own programs, or if you use a macro language to create automated procedures in a program - for example, if you use VBA to automate tasks in Word, Excel, or Outlook. You could also use the Registry to store odd information, such as names and addresses - but there are far better ways of spending your time.

Preparing to Access the Registry

Before you do anything to the Registry, you need to understand this: If you mess up the Registry, you may disable parts of Windows’ functionality. You may even disableWindows itself so that it cannot boot. So before you do anything to the Registry, back it up by exporting it as discussed in the section after next. In fact, even if you don’t make any changes to the Registry, it’s a good idea to keep a backup of your Registry in case a program, Windows itself, or more likely a piece of malware makes a change for the worse.

System Restore May Be Able to Undo Registry Damage

System Restore discussed in detail in Article 16 rolls back Registry entries to their state when the restore point was created, so you can use System Restore to recover from damage to the Registry. Because System Restore also changes other settings, however, it’s a clumsy solution that’s best avoided unless you’ve failed to back up your Registry before mangling it. However, you may want to create a new restore point as insurance before making changes to the Registry.

Running Registry Editor

To work with the Registry, you use the program called Registry Editor. Windows provides no Start menu item for Registry Editor, but you can create your own Start menu item or Desktop shortcut if you want. Unless you create a Start menu item or shortcut, the easiest way to run Registry Editor is as follows:

1. Press Windows Key+R. Windows displays the Run dialog box.

2. Type regedit in the Open text box, press Enter or click the OK button, and then authenticate yourself to User Account Control. Windows starts Registry Editor .

Backing Up Your Registry

Before you do anything else with Registry Editor - and that includes exploring the subtrees and keys of the Registry, let alone changing any values - back up your Registry. Depending on what’s installed on your computer, a full backup of the Registry may be 100–200MB altogether, so you’ll normally want to back up the Registry to a file on your computer. You can then burn the file to a recordable CD or DVD, store it on a secure network drive, or put it on a USB keychain or USB drive. To back up the Registry, export it by taking the following steps from Registry Editor:

1. Select the Computer item in Registry Editor if you want to back up your whole Registry as you should do at first. If you want to back up only a subtree of the Registry, select the subtree instead of the Computer item.

2. Choose File Export. Registry Editor displays the Export Registry File dialog box. As you can see, this dialog box is a common Save As dialog box with an extra section tacked on at the bottom to house the Export Range group box.

3. In the Export Range group box, make sure the All option button is selected. If you chose a subtree in step 1, the Export Registry File dialog box appears with the Selected Branch option button selected and the subtree’s name entered in the Selected Branch text box.

4. Specify the filename and location for the file as usual.

5. Click the Save button. Registry Editor closes the Export Registry File dialog box and saves the Registry file.

Restoring Your Registry

To restore your Registry or part of it from a Registry file you’ve exported, follow these steps:

1. From Registry Editor, choose File Import. Registry Editor displays the Import Registry File dialog box.

2. In the drop-down list above the Open button, select the Registration Files item if you’re restoring your entire Registry. If you’re restoring a hive file, select the Registry Hive Files item.

3.Select the Registry file to import.

4. Click the Open button. Registry Editor imports the Registry file and adds it to the Registry.

Restoring the Registry to Its Last Known Good Configuration

If you damage the Registry so badly that Windows won’t boot anymore, you may need to restore the Registry to its Last Known Good Configuration in order to get Windows running again. The Last Known Good Configuration is the one with which Windows last booted successfully. Restoring the Last Known Good Configuration loses any changes you’ve made to your Windows configuration since the last boot - including whichever change has disabled Windows. To restore the Registry to the Last Known Good Configuration, take the following steps:

1. Restart or start your computer:

• If Windows is still running, restart it: click the Start button, click the right-arrow button to the right of the Lock button, and then choose Restart.

• If Windows isn’t running, power up your computer as usual.

2. As Windows restarts or starts, or when in a multiboot configuration it displays the Windows Boot Manager, press the F8 key. Windows displays the Advanced Boot Options menu .

3. Select the Last Known Good Configuration item and press the Enter key. Windows starts and displays the Welcome screen.

Working in the Registry

Now that your Registry is safely backed up, it’s time to examine how the Registry works and how you can change it. The Registry is a hierarchical database, with its contents arranged into a hierarchy of folders that are organized into five main areas called subtrees or root keys. You’ll also sometimes hear them called predefined keys, though the term tends to be confusing because the Registry contains thousands of keys that are predefined - at least, from the user’s point of view.

The Five Subtrees of the Registry

These are the five subtrees and the types of information they contain:

HKEY_CLASSES_ROOT This subtree contains an exhaustive list of the file types that Windows recognizes, the programs associated with them, and more.

HKEY_CURRENT_USER This subtree contains information on the current user and their setup. For example, when you’re logged on, all your Desktop preferences are listed in this subtree.

HKEY_LOCAL_MACHINE This subtree contains information on the hardware and software setup of the computer.

HKEY_USERS This subtree contains information on the users who are set up to use the computer, together with a DEFAULT profile that’s used when no user is logged on to the computer.

HKEY_CURRENT_CONFIG This subtree contains information on the current configuration of the computer - the hardware with which the computer booted.

Keys, Subkeys, and Value Entries

In Registry Editor, expand the HKEY_CURRENT_USER subtree by clicking the plus + sign next to it or by double-clicking its name. Registry Editor displays the items contained within the subtree - an apparently endless list of folderlike objects, many of them containing further objects. Within each subtree are keys, subkeys, and value entries. A key is one of the folders within the subtree. Just as a subfolder is a folder within a folder, a subkey is a key within a key. Also as with “folder” and “subfolder,” many people say “key” rather than “subkey” except when they need to be specific; this article does the same. Each key or subkey can contain subkeys and value entries. The term value entry sounds like a management-consultant way of saying “value,” but in fact it’s not: A value entry is the current definition of a key and consists of a name, a data type, and the value assigned to the key. For example, consider the MinAnimate key and value entry in the HKEY_CURRENT_USER\ControlPanel\Desktop\WindowMetrics\ subkey. As you can see in the Data column, the value of MinAnimate is 1. This value entry controls whether Windows animates windows when you minimize, maximize, or restore them. The animation zooms the window from its displayed size and position down to its button on the Taskbar, and vice versa, instead of popping it off or back on the screen instantly. A value of 0 indicates that the animation is off; a value of 1 that the animation is on. Try this example of changing a setting both via Windows’ user interface and via Registry Editor. Follow these steps:

1. In Registry Editor, expand the HKEY_CURRENT_USER\Control Panel\Desktop\ WindowMetrics key so that you can see the MinAnimate key. Its value should be 1, the default value for a computer that’s fast enough to run Windows Vista without struggling.

2. Press Windows Key+Break. Windows displays the System window of Control Panel.

3.In the left panel, click the Advanced System Settings link, and then authenticate yourself to User Account Control. Windows displays the System Properties dialog box with its Advanced page at the front.

4. In the Performance group box, click the Settings button. Windows displays the Performance Options dialog box with the Visual Effects page at the front .

5. In the list box, clear the Animate Windows When Minimizing and Maximizing check box. Windows selects the Custom option button above the list box if another option button was selected.

6. Click the OK button. Windows closes the Performance Options dialog box, returning you to the System Properties dialog box.

7. Click the OK button. Windows closes the System Properties dialog box.

8. Click the Registry Editor button on the Taskbar to activate Registry Editor.

9. Press F5 or choose View Refresh to refresh the Registry listing. Notice that the MinAnimate value has changed to 0 because you cleared the check box.

10. Click the Minimize button on Registry Editor to minimize the window. Notice that Windows doesn’t animate the minimization.

11. Click the Registry Editor Taskbar button to restore the window. Again, Windows doesn’t use an animation.

12.In Registry Editor, double-click the MinAnimate key. Registry Editor displays the Edit String dialog box, as shown here, which lists the value name and the current value data.

13. In the Value Data text box, type 1 replacing the 0, and then press Enter or click the OK button. Registry Editor closes the dialog box and applies the value.

14. Click the Minimize button on Registry Editor to minimize the window. Notice that Windows again doesn’t animate the minimization. This is because many changes you make via Registry Editor require you to log out and then log in again before they take effect.

15. Log off, and then log on again.

16. Open a window, and then minimize it. Windows uses the animation again. If you open the Performance Options dialog box again, you’ll find that the Animate Windows When Minimizing and Maximizing check box is now selected.

legal disclaimer

Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.

related articles

1. Windows Vista Put Some Gadgets in Your Windows Sidebar
Apple users have long been able to take advantage of the Mac OS X Dashboard, and Windows users have been able to download Yahoo Widgets (formerly Konfabulator Widgets). Those things are still available, but now Vista has its own little tools, known as gadgets. Vista gadgets live in the new Windows Sidebar which you can move to the left or right side of the screen by right-clicking it and selecting Properties. Or you can put Gadgets on your Desktop by dragging the little context menu that appears when you hover ...

2. Support for RSS News Feeds in Windows Vista
IE 7.0 includes an easy way to subscribe to news feeds, regularly updated information that sites publish in the format known as Really Simple Syndication (RSS). When a surfer visits a site that publishes one or more news feeds, a square broadcast icon on IE 7’s toolbar changes from grey to orange. Clicking the icon takes you to a page that explains the content of a feed and provides a clickable link that subscribes you. This is a big improvement over previous news feed buttons in other browsers, which formerly ...

3. Thinking of Cheating at Solitaire in Windows Vista
Unfortunately, Vista new Solitaire code seems to have broken one way that neerdowells have cheated at the game for years. This scandalous behavior was first revealed in Windows 3 s all the way back in 1991. As that article explained it, you could click Game - Undo when playing a Draw Three game, and the last three cards you turned over from the deck would go back on the pile. If you then held down the Shift key while clicking the deck, only one card at a time would turn over, allowing you to ...

4. A Quick Overview of All the Versions of Windows Vista
It seems like Windows Vista has a lot more versions than Microsoft has ever offered before. But that isn’t quite true. The Redmond company years ago split Windows XP into almost as many versions as we have today with Vista. You may occasionally hear Vista’s versions referred to as SKUs. This term stands for Stock Keeping Unit. We’ll use the more common terms version and product version throughout this article instead. Here’s a review of the major Windows XP versions (rough...

5. Taking Advantage of Your Ability to Upgrade to Windows Vista
Windows Anytime Upgrade Unlike previous versions of Windows, Vista installs itself with the capability to upgrade from a weaker version to a more-capable version at any time. You simply run the Anytime Upgrade applet, select a source to purchase an upgrade license from, and your PC is quickly enhanced with the more powerful version you’ve selected. _ Vista Home Basic can be upgraded in this way to Home Premium or Ultimate. _ Vista Home Premium and ...

6. Deploying Windows Vista: A Power User`s Toolkit
If you’re an enterprise administrator faced with the prospect of rolling out Windows Vista to hundreds or thousands of desktops around the world, take heart: Microsoft has finally upgraded its deployment tools in dramatic fashion, taking advantage of the componentized architecture of Windows Vista. But these deployment tools aren’t just advantageous to the world’s biggest corporations. If you’re a power user, a tinkerer, or someone who ends up having to reinstall Windows fairly regularly, you mi...

7. What`s New in the Windows Vista User Interface
Gazing upon Windows Vista for the first time, you will immediately be struck by how different everything looks when compared to older Windows versions such as Windows XP and Windows 2000. Now, windows are translucent and glass-like, with subtle animations and visual cues. This new interface leaves no doubt: Windows Vista is a major new Windows version, with much to learn and explore. In this article, we’ll examine the new Windows Vista user interface, called Aero, and explain what you need to ...

8. Windows Vista Aero requirements
As noted earlier, you have to be running an activated version of Vista Home Premium, Business, Enterprise, or Ultimate Edition in order to utilize Windows Vista Aero. Here, activated refers to the Product Activation feature that’s included in Windows Vista, whereby each Windows Vista installation is guaranteed, via a service called Windows Genuine Advantage, to be legitimate and not pirated. Most copies of Windows Vista that are preinstalled on new PCs come pre-activated, so this is a step that many users...