Windows Vista: Registry data types

an article added by: Don Jefferson at 06212007


In: Categories » Computers and technology » Windows Vista » Windows Vista: Registry data types

Registry Data Types

The MinAnimate value entry is of type REG_SZ. REG means Registry; SZmeans string, indicating that the value entry contains a string of text text characters, as opposed to, say, binary data. The \WindowMetrics\ key also contains value entries of two other data types, REG_BINARYbinary data and REG_DWORD the double-word data type. Strings and binary data are the most widely used of the data types in the Registry. Double-word data comes third, followed by REG_MULTI_SZ multistring entries, and REG_EXPAND_SZ expandable strings. Table 11.1 provides a roundup of the five most widely used data types.

Table 11.1: The Five Most Widely Used Registry Data Types

Type Type Displayed Explanation
String REG_SZ Text
Multistring REG_MULTI_SZ Text, but with multiple text values
Expandable String REG_EXPAND_SZ Text, but expandable
Binary REG_BINARY A binary value, displayed as hexadecimal
DWORD REG_DWORD Double-word: a 32-bit binary value displayed as an
8-digit hexadecimal value

Other Registry Data Types You’ll Seldom Need to Use

Beyond the five widely used data types listed in Table 11.1, the Registry can contain many different data types, such as REG_DWORD_BIG_ENDIAN a value stored in reverse order of double-word value, REG_ DWORD_LITTLE_ENDIAN another type of double-word value, REG_FULL_RESOURCE_DESCRIPTOR a hardware-resource list, REG_QWORD a quadruple-word value, and REG_FILE_NAME a filename. You shouldn’t need to mess with any of these unless you get into programming Windows. You can create and edit value entries with any of these data types. We’ll get to that a bit later in the article, after discussing where the Registry is stored and how to find information in it.

Where the Registry Is Stored

Most of the Registry is stored in several different files on your hard drive. Part of the Registry is created automatically when Windows boots and discovers which devices are attached to your computer. These files are binary and are called hives think bees, not allergies or hive files. Perhaps surprisingly, some of the hives aren’t hidden files, so you don’t even need to tell Windows to display hidden files before you can see them. But you do have to go through Windows’s veil of secrecy over the files by clicking the Show the Contents of This Folder link. Hive files containing computer-related information are stored in the \Windows\system32\ config\ folder, where \Windows\ is your Windows folder. Hive files containing user-specific information are stored in the \Users\Username\ folder for each user. These are the main hive files:

SYSTEM This file contains information about the computer’s hardware and about Windows. This information goes into the HKEY_LOCAL_MACHINE\SYSTEM\ key.

NTUSER.DAT This file contains information about the user’s preferences. Windows keeps an NTUSER.DAT file for each user in the \Users\Username\ folder. This information goes into the HKEY_CURRENT_USER subtree.

SAM This file contains the user database. This information goes into the HKEY_LOCAL_MACHINE\ SAM\ key.

SECURITY This file contains information on security settings. This information goes into the HKEY_LOCALMACHINE\SECURITY\key.

SOFTWARE This file contains information on the software installed on the computer. This information goes into the HKEY_LOCAL_MACHINE\SOFTWARE\ key.

DEFAULT This file contains information about the default user setup. This information goes into the HKEY_USERS\DEFAULT\ key. Each of the hive files has a log file named after it: DEFAULT.LOG, SOFTWARE.LOG, NTUSER.DAT.LOG, and so on. These log files note the changes to the hive files so that, if a change is applied that crashes the system, Windows can read the log, identify the problem change, and undo it. Windows doesn’t let you open the hive files directly other than by using Registry Editor. But you can find keys and value entries or information in the Registry, change values, and create and delete keys and value entries of your own.

Finding Information in the Registry

There are two ways to find information in the Registry: by digging through the Registry looking for it, or by using the Find function. Digging through the Registry takes minimal explanation, because it’s very similar to browsing in Explorer in Explore mode. You can expand and collapse keys as you would drives and folders in Explorer, and you can use type-down addressing to reach the next key or entry matching the letters you type. But because of the number of keys and value entries the Registry contains, you’ll usually do better by searching through it rather than browsing. If you know the name of a key, the name of a value entry, or the data contained in a value entry, you can search for it. For example, if you wanted to find where FTP sites were listed, you might search for FTP Sites. If you wanted to find out what the entry for the Microsoft Office AutoCorrect file was called, you might search for .ACL, the extension of the AutoCorrect file. To search the Registry, follow these steps:

1. In Registry Editor, choose Edit Find or press Ctrl+F. Registry Editor displays the Find dialog box shown here.

2. In the Find What text box, type the term for which you want to search.

3. If you want to restrict the search, select only the check boxes for the items you’re looking at - Keys, Values, or Data - in the Look At group box.

4. If you want to search for only the entire string, select the Match Whole String Only check box. Selecting this check box prevents Find from finding the string you’re looking for inside other strings - it makes Find locate only whole strings that match the string in the Find What text box.

5. Click the Find Next button to start the search.

Because of the volume of information that Windows stores in the Registry, the first match you find may not be the key or value entry, or value you need. For example, if you use your company’s name as the Find item when looking for the RegisteredOrganization key for Windows, you may find another key, such as the registered organization for Internet Explorer. Close examination of the key will usually tell you whether you’ve found the key you were looking for. If not, press the F3 key or choose Edit Find Next to find the next instance.

Editing a Value Entry

To edit a value entry in the Registry, navigate to it or find it, and then double-click it. Alternatively, select it and choose Edit Modify or right-click it and choose Modify from the shortcut menu. Windows displays the Edit dialog box for the type of data the value entry contains.

String values and expandable string values are the easiest values to edit. In the Edit String dialog box , enter the text of the string in the Value Data text box, and then click the OK button. Multistring values are relatively simple to edit. In the Edit Multi-String dialog box enter all the data for the value entry on separate lines, and then click the OK button. Double-word values are the next easiest values to edit. In the Edit DWORD 32-bit Value dialog box , enter the data in the Value Data text box, then choose the Hexadecimal option button or the Decimal option button as appropriate in the Base group box. When you’re editing a built-in double-word value, you shouldn’t need to change the existing Base setting. Click the OK button. Binary values are difficult to change, and you probably won’t want to mess with them for fun. In the Edit Binary Value dialog box , edit the data in the Value Data text box with great care, and then click the OK button.

Adding a Key or a Value Entry

You can add a key or a value entry to the Registry either automatically or manually. To add a key or value entry to the Registry automatically, double-click a .reg file that you’ve received. For example, some programs sold via download use Registry keys to implement a license: You pay for the program and download it. The company then e-mails you a license and a .reg file. To add the registration data to your Registry, double-click the .reg file. Windows adds the necessary keys and value entries to the Registry. To add a key or a value entry to the Registry manually, follow these steps:

1. Right-click the key in which you want to create the new key or value entry, choose New from the context menu, and choose the appropriate item from the submenu: Key, String Value, Binary Value, DWORD 32-Bit Value, QWORD 64-Bit Value, Multi-String Value, or Expandable String Value. Registry Editor creates a new key named New Key #1 or a new value entry named New Value #1 or the next available number and displays an edit box around it.

2. Type the name for the key or value entry.

3. Press the Enter key or click elsewhere in the Registry Editor window. Registry Editor assigns the name you specified to the key or value entry. If you created a value entry, double-click it. Registry Editor displays the Edit dialog box for the value entry’s data type. Enter the data for the value entry as described in the previous section.

Deleting a Key or a Value Entry

Just as you can create keys and value entries, you can delete them. Generally speaking, it’s a bad idea to delete any keys other than those you’ve created. Windows itself and Windows programs protect some keys in the Registry, but you’ll find a surprising number that aren’t protected and that you can therefore delete freely. To delete a value entry, right-click it and choose Delete from the context menu. Registry Editor displays the Confirm Value Delete dialog box shown here. Click the Yes button to confirm the deletion. To delete a key, right-click it and choose Delete from the shortcut menu. Registry Editor displays the Confirm Key Delete dialog box shown here to make sure you want to get rid of the key and all its subkeys and value entries. Click the Yes button to delete the key.If the key or value entry is locked against deletion, Registry Editor displays an error message box.

Copying a Key Name

If you’re describing to someone how to find particular information in the Registry, you’ll need to get the key name right. But you don’t need to type it painstakingly - you can copy it instead. To copy a Registry key name, select it in the left pane in Registry Editor and choose Edit Copy Key Name. You can then paste it from the Clipboard into a program.

Examples of Working with the Registry

As mentioned at the beginning of the article, Microsoft reckons you should seldom or preferably never need to make changes to the Registry directly. But you’ll probably run into tips and tweaks, online or in magazines, that promise to improve Windows’ performance, compatibility, or behavior with a judicious change or two. This section presents some examples of working with the Registry to customize your system. Remember that tinkering with the Registry isn’t recommended, because it can have unexpected results. Before you try any of these examples, back up your Registry as described earlier in this article and make sure that you know how to restore it.

Evaluate Any Registry Changes Carefully before Trying Them

Before you try applying any Registry change that you read about online, think carefully about how much you trust the source of the information and whether you’re likely to realize the benefits promised by the change. Changes recommended by print magazines and by reputable online magazines are likely to be okay, but changes posted by supposedly friendly parties in newsgroups or on websites might be malicious rather than helpful. If you have any doubts, spend a few minutes searching for corroboration of the Registry change rather than applying it blindly and suffering the consequences. If you can’t find confirmation of what the change does, don’t try it.

legal notice

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.

Useful tools and features

Link to this article from your page    Send this article to you or to a friend
If you like this article (tutorial), please link to it from your web page using the information above.

related articles

1. 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 ...

2. 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...

3. 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 ...

4. 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...

5. 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 ...

6. 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...

7. Windows Vista Security Features
Although the Windows Vista Aero user interface is the most obvious change to Windows Vista, some of the more important, if less obvious, changes in this new operating system regard security. In this article, we examine the various new security features in Windows Vista. Security and Windows Vista It’s been a tough decade for Windows users. As Microsoft’s operating system entered the dominant phase of its existence, hackers began focusing almost solely on Windows, since that’s where all the user...

8. Multiprotocol Label Switching Operation and Maintenance
You can use Multiprotocol Label Switching Operation and Maintenance (OAM) to detect operational failures, but also for accounting and performance measurement in the Multiprotocol Label Switching network. Problems on the control plane can be reported by traps or seen by polling the Management Information Base (MIB). This might suffice for IP networks, but it is more difficult to detect the problems that are purely in the data plane when the network is running Multiprotocol Label Switching. Multiprotocol Label Switching O...

9. Windows Vista A New Look and Feel
The most obvious (though certainly not the most important) new feature is the Aero Glass interface. Windows users have been using a 3D interface for years. You can open as many programs as you want, and they stack up like sheets of paper on a desktop. It just wasn’t very obvious that you were using a 3D interface with items stacked up on your desktop. Aero Glass changes that by making the borders around program windows semitransparent, so you can see when there’s something behind whatever you’re looki...