Windows xp registry ebooks




















In reality, though, operating systems often get in the way, fouling up the process at the most inopportune times. And Windows XP is no exception. O'Reilly's popular series for customizing and troubleshooting Windows once again comes to the rescue with Windows XP Annoyances for Geeks. Offering dozens of on-target tips, workarounds, and warnings, Windows XP Annoyances for Geeks allows. Inside, you'll learn to customize Windows XP, optimize the network, and avoid scores of potential disasters, all by working with registry settings.

If you're a power user, a system administrator, programmer, or consultant, this guide is absolutely essential. The definitive guide to unlocking the hidden potential of the Windows 7 OS Written by bestselling author and the creator of tweaks.

Packed with more than pages of insider tips, the book delves beneath the surface to reveal little-known ways to tweak, modify, and customize Windows 7 so you can get every ounce of performance from. Top Windows expert Paul McFedries dives deep into Windows 7, returning with the most powerful ways to handle everything from networking to administration, security to scripting. You can nest one or more keys within another key as long as the names are unique within each key.

In addition, Windows XP reserves all names that begin with a period for its own use. The similarities between the registry and file system continue with paths. This notation is a fully qualified path.

I often refer to a key and all its subkeys as a branch. Thus, when you see something that describes the key Software and its subkey Microsoft, it indicates that Microsoft is a child key under Software. The last thing to tackle in this section is the concept of linked keys.

Each hardware profile is a subkey nnnn, where nnnn is an incremental number beginning with The subkey Current is a link to whichever key is the current hardware profile, and root key HKCC is a link to Current. Think of links as aliases or shortcuts, if you care to continue the file system analogy. Values Each key contains one or more values. In my analogy with Windows Explorer, values are similar to files. Every value has a name. Within each key, value names must be unique, but different keys can have values with the same name.

Each value can be empty, or null, or can contain data. When you look at the registry through Registry Editor, you see the default value as Default. In most cases, the default value is null, and Registry Editor displays its data as value not set.

In If there is no backslash, pay particular attention to the context to make sure you know whether the path is just a key or includes a value. Sometimes a bit of common sense is all you need. Types Windows XP supports the following types of data in the registry. Binary data. Registry Editor displays binary data in hexadecimal notation, and you enter binary data using hexadecimal notation.

You can view and edit these values in decimal or hexadecimal notation. For example, the number 0x is stored in memory as 0x01 0x02 0x03 0x For example, the number 0x is stored in memory as 0x04 0x03 0x02 0x A value of this type can include environment variables, and the program using the value expands those variables before using it. Resource lists for a device or device driver. A link. Binary values that contain lists of strings. Registry Editor displays one string on each line and allows you to edit these lists.

In the registry, a null character 0x00 separates each string, and two null characters end the list. Values with no defined type. The only version of Windows XP that supports this type of Registry Editor allows you to view but not edit this type of value. List of resources that a device requires.

Each string ends with a null character. Data in Binary Values Of all the values in the registry, binary values are the least straightforward. When an application reads a binary value from the registry, deciphering its meaning is up to the program.

This means that applications can store data in binary values using their own data structures, and those data structures mean nothing to you or any other program. The registry actually stores all values as binary values. The registry API identifies each type of value by a number, which programmers refer to as a constant, and which I tend to think of as the type number.

The overview in this section makes getting around in the registry easier until you get there. These are the only root keys that Windows XP actually stores on disk. In Chapter HKCU is linked to this key. Any other subkeys in HKU belong to secondary users.

This feature, called secondary logon, enables users to run programs with elevated privileges without requiring them to actually log on to a different account. The program runs under the Administrator account and, in this case, HKU contains settings for both the Jerry and Administrator accounts.

This technique helps prevent human error as well as opportunistic viruses. This branch includes environment variables, desktop settings, network connections, printers, and application preferences. Associates sounds with events. For example, it associates sounds with opening menus, minimizing windows, and logging off Windows XP.

In addition, the Console key can contain subkeys for custom command windows. Contains accessibility, regional, and desktop appearance settings. You configure most of these settings in Control Panel. However, this key contains a handful of useful settings that have no user interface; you can configure them only through the registry.

Stores environment variables users have set. Each value associates an environment variable with the string that Windows XP substitutes for the variable. Contains one subkey for each identity in Microsoft Outlook Express. Outlook Express uses identities to allow multiple users to share a single mail client.

Contains information about the installed keyboard layouts. Stores information about mapped network drives. Each subkey in Network is a mapped drive to which Windows XP connects each time the user logs on to the computer.

Stores user preferences for printers. Windows XP stores much of its own configuration in this key, too. Contains environment variables defined when the user logged on to Windows XP. Other subkeys you see in HKCU are usually legacy leftovers or uninteresting.

Settings run the gamut from device driver configurations to Windows XP settings. Stores data describing the hardware that Windows XP detects as it starts. The operating system creates this key each time it starts, and it includes information about devices and the device drivers and resources associated with them. Windows XP stores settings in this key, too. Contains control sets, one of which is current. The remaining sets are available for use by Windows XP.

Each subkey is a control set named ControlSetnnn, where nnn is an incremental number beginning with The operating system maintains at least two control sets to ensure that it can always start properly. These sets contain device driver and service configurations. The first is file associations that associate different types of files with the programs that can open, print, and edit them.

This root key is also the largest in the registry, accounting for the vast majority of the space that the registry consumes. This is probably the biggest benefit of the merge. Note HKCR is significant enough that it gets its own appendix. You learn how it associates file extensions with file types, how Windows XP registers COM objects, and which subkeys are the most interesting to customize.

You learn about many of them throughout this book. The significance of this tool is that it allows you to script edits in batch files. For more information about Reg.

This is The result is a list of hundreds of registry tools with a wide variety of special features, such as search and replace. Make sure that you download a program that works with Windows XP, though. This is how Windows XP presents the registry to you and the programs that use it, regardless of how the operating system actually organizes it on disk, which is much more complicated. Physically, Windows XP organizes the registry in hives, each of which is in a binary file called a hive file.

These backups allow the operating system to repair the hive during the installation and boot processes if something goes terribly wrong. All other root keys are links to keys within those two. In Windows , System. What you should get out of this table is that each hive in the first column comes from the files in the second column.

LOG Software, Software. Evt, SecEvent. Evt, and SysEvent. The remaining subkeys come from two different sources, though. Each time a new user logs on to Windows XP, the operating system creates a new profile for that user using the default user profile.

The profile contains a new Ntuser. This key contains one subkey for each profile that the operating system has ever loaded, past or present. Note Windows limited the size of the registry, but Windows XP does not. This means that the operating system no longer limits the amount of space that the registry hives consume in memory or on the hard disk. Microsoft made an architectural change to the way Windows XP maps the registry into memory, eliminating the need for the size limit you might have struggled with in Windows With Registry Editor, you affect settings without the help of a user interface.

On the other hand, nothing is checking the settings you change for sanity. Every version of Windows since 3. The editor in Microsoft Windows 95 can search the registry and has a simple to use interface. Microsoft Windows NT 4. Now, with Windows XP, you get the best of both editors in a single program insert applause for the developers here. Registry Editor in Windows XP is the tool you learn about in this chapter. This chapter contains more than just instructions for how to use the editor, though.

Imagine what life as an IT professional or power user who supports friends and relatives would be like if Microsoft advertised this program to every Windows XP user on the planet. For example, I recently used a program that changed critical settings while it was running, and then restored them when the program shut down. Unfortunately, the program crashed without restoring the settings and the only way I could get them back to their original values was to edit the registry. Regedit and Registry Editor are one and the same.

Click Start, Run, and type regedit to run Regedit. If you want to start Regedit even quicker, drag Regedit. IT professionals can prevent users from running Regedit.

They can set the Disable registry editing tools policy in Group Policy, local or otherwise. I cover these topics in detail elsewhere in this book. Shareware registry editors also circumvent Software Restriction Policies and permissions that you apply to Regedit. In reality, determined users will always find a way to hack away at the registry, so part of the solution must be a corporate IT policy that you clearly communicate to users. Exploring Regedit With all its power, Regedit is still a simple program with a straightforward user interface.

Its few menus are simple. It has a status bar that displays the name of the current key. Its window contains two panes, split by a divider that you can drag left or right to change the size of both panes.

On the left is the key pane; on the right is the value pane. The value pane displays the settings that each key contains. Regedit saves its settings every time you close it. The next time you start Regedit, the window will The columns will also be the same size.

Last, Regedit reselects the last key that you selected. You no longer have to flip back and forth between both registry editors to complete most tasks. Additionally, Windows XP makes substantial improvements to the registry itself.

Second, the registry is faster in Windows XP than in earlier versions of Windows. Windows XP keeps related keys and values closer together in the database, preventing page faults that degenerate into disk swapping. All in all, the registry in Windows XP is significantly faster to query than it was in Windows At the top, you see My Computer, which represents the local computer.

Following each root key are its subkeys. The term branch refers to a key and all its subkeys. Click any key to see its values in the value pane.

You can use the mouse pointer to explore the registry, but using the keyboard is much more efficient when you know the keyboard shortcuts that are available. These are quick ways to move around the registry while expanding and collapsing entire branches at the same time. Regedit displays all the hive files together to show a single, unified registry, though. In Regedit, you can see when a branch is its own hive because its name is capitalized. For example, all the subkeys under HKLM are hives, so their names are capitalized.

When you change a value in Regedit, Windows XP updates the appropriate hive file. Refer back to Chapter 1 if you need a refresher on how Windows XP stores the registry on disk. In this pane, you see three columns: Name, Type, and Data.

You can change the size of each column by dragging the dividers left or right. I typically use about half the pane to display the Name and Type columns and the remainder of the Each row contains a single value. The Type column indicates the type of data in that value. To get a better glimpse of binary values, click View, Display Binary Data. I promise. For instance, you might want to figure out why a program runs every time you start Windows XP.

You can search key names, value names, and string data. The first hit can take a long while to show up, so be patient. After Regedit finds a hit, it selects the key or value it found.

On the Edit menu, click Find. Use more characters or require full matches to get fewer hits. To find keys whose name contains the text, select the Keys check box. To find values whose name contains the text, select the Values check box. Click Find Next. Press F3 to repeat your search if necessary. You can significantly cut down the time it takes to search the registry by narrowing the focus to keys, values, or data.

For example, if you know that you want to search only for values that contain certain characters in their names, limit your search to value names. Searching Incrementally Incremental searching makes finding subkeys and values in long lists much faster.

Type d without delaying too long so as not to restart the incremental search and Regedit selects WMDFile. You get the idea. That is, incremental searching only finds keys that you can see by scrolling the key pane up or down. It searches only for key names, value names, or string values. The solution is straightforward, though. Export the branch that you want to search to a REG file. Then open the REG file in Notepad, and search for the number or binary string you want to find.

You have to know how Regedit formats values in REG files to find them, however. Thus, Jerry as a binary string is 0x 4A 0x00 0x65 0x00 0x72 0x00 0x72 0x00 0x79 0x To find binary strings in a REG file that contain the word Jerry, search for 4a,00,65,00,72,00,72,00, Chapter 9 describes the format of every value type and what they look like in REG files. This enables you to bookmark the subkeys that you edit most frequently and return to them quickly.

Clicking a subkey on the Favorites menu is certainly a better alternative to clicking your way through the key pane or, worse yet, trying to remember where Windows XP stores the Run key in the registry. In the Add To Favorites dialog box, type a descriptive name for your shortcut. You might like to have some help getting your Favorites menu going. On the Favorites menu, click Remove Favorite, and then click the keys you want to remove. Edit the REG file to sort the keys in alphabetical order, or any other order that you prefer, and then import the REG file back in to the registry after removing the Favorites key.

The Favorites menu is resorted. Save this REG file, by the way, so you can use your favorites elsewhere. Click a subkey near where you want to begin, and then search.

As you repeat your search by pressing F3, keep an eye on the status bar and note the key that contains the current hit. For that matter, do an incremental search to speed things up.

Shareware Search Tools A variety of shareware tools are available for searching the registry. They are far more advanced than Regedit and designed specifically to make digging around the registry easier and quicker. You can download evaluation versions of these tools at any shareware site. Registry Crawler not only searches the registry faster than Regedit, but it has features that make the task easier. You can access it quickly from the system tray.

It presents a list of matches that you see all at once, rather than bouncing around from hit to hit, and you can export the results to a REG file. It also enables you to search the registries of multiple computers at one time if you have access to them over a network.

You can also change most values. Use whichever method is right for you, but I prefer keyboard shortcuts because I deplore touching the desktop rodent without a reason. You can edit any value by selecting it and pressing Enter. The following sections describe the features that Regedit provides for editing the registry. Changing Values I promise that One way to change a value is to click Edit, Modify. This version has dialog boxes for almost all the value types that Windows XP supports.

The following graphics show what the different editors look like, with a description of each. You can copy values from this dialog box to the clipboard, which is a nifty way to get values into scripts and documents. You can edit the value as a decimal number by selecting the Decimal option. The first column of numbers in this dialog box is the offset, starting from zero.

The second column of numbers contains the binary string in hexadecimal notation. The last column shows the text representation of the binary string. You can edit either the second or third columns. You can type hexadecimal digits or plain text. Each string is on its own line with no blank lines. In fact, all changes go unnoticed until the program or operating system has a reason to load or reload that value from the registry.

You can copy value names and data to the clipboard, too. This is a great way to back up data before changing it. Before changing a value, copy its data to the clipboard, create a new value of the same type, and paste the data on the clipboard into it. Adding Keys or Values The only reason you would create keys and values is if you were instructed to do so; that is, you know adding the value will have some effect.

Throughout this book, you learn about values you can add to the registry that customize Windows XP. When you create a new key, Regedit names it New Key N, where N is an incremental number beginning with 1, and then selects the name so you can change it. Creating a new value is similar: 1. In the Key pane, click the key in which you want to add a value. Type a name for the new value. Regedit names the new value New Value N and then selects it so you can type a new name.

Windows XP requires all names contained in a key to be unique. No two subkeys can have the same name and no two values can have the same name. The default data for binary values is null, or no value whatsoever. The default value for strings is the empty string. After you create a new value, you edit it to change its value from the default. Another circumstance is when I want to tidy up the registry a bit.

With a little thought and a little luck, you can clean these settings out of the registry. Then if something goes terribly wrong, and it happens from time to time when digging around in the registry , I can remove the current version of Session and give the old version its original name.

Instead, you click the key or value that you want to rename, and then click Rename on the Edit menu. You can also click the key or value you want to rename, and then press F2.

To rename a key or value, select the key, click Edit, Rename, and type a new name. Printing the Registry Regedit has a feature that prints all or part of the registry.

To print all or part of the registry, follow these steps: 1. Click Print. Exporting Settings to Files Exporting all or part of the registry is one of those things IT professionals and power users do often. By exporting, I mean copying portions of the registry to another file, typically a REG file but hive files are more useful. This is a great way to back up settings so you can easily restore them later, if necessary.

First is deployment. The differences between the four are significant, and you learn about them later in this chapter. Follow these steps to export branches of the registry to files:. Click the key at the top of the branch you want to export. Click Save. Importing a file into the registry is similar to opening a file. Each type is a different file format and thus suited to different purposes than the other types. Each section name represents a key, and each item in a section represents a value.

For example, the letter A is 0x, not 0x In the previous section, you learned how to import REG files using Regedit. For example: regedit settings.

For example, exporting hardware settings from the Windows NT 4. Use common sense. That means that each character is a single byte wide. The letter A is 0x Each format has strengths and weaknesses that make it appropriate for some tasks and useless for others.

This section should help you choose the right format each time. Exporting to hive files is my choice most of the time. They are the same format as the Windows XP working hive files, so they represent settings exactly the same way. When restoring keys from a backup after an unsuccessful registry edit, this is exactly the behavior you want.

Hive files have one more strength that make them my choice most of the time: You can load them as new hives and view their contents without affecting other parts of the registry. Although hive files are my choice most of the time, there are a few scenarios that require me to use REG files. Hive Files Hive files are binary files that contain portions of the registry. Regedit displays all these hives together in one logical unit.

Hive files are useful tools, though. You can export branches to hive files that can then be imported to another computer or by another user. Exported hive files have purposes similar to REG files. The advantage that hive files have over REG files is that you can load and edit them in Regedit without actually replacing your own settings.

They are one and the same. Loading a hive file is different from importing a hive file. When you import a hive file, which you learned how to do in the previous section, you actually replace settings in the registry.

In other words, you load the hive file over existing settings. This enables you to edit the settings in a hive file without changing your own settings.

On the File menu, click Load Hive. The name you give to the key is arbitrary. Unloading a hive file is easy: Click the key into which you loaded the hive, which you specified in step 4, and then click Unload Hive on the File menu.

And this tool installs with Windows XP, unlike earlier versions of Windows, which required you to get the tool from the resource kits. You can use it to script registry changes. For example, you can write a batch file that automatically backs up a portion of the registry. Imagine a batch file that extracts hardware information from a computer and dumps it on to a network share. Recently, I used Reg. This was a huge timesaver. If you want to learn more about it now, just type Reg. These are the basics that you must know to perform routine tasks such as changing registry values.

You also learn how to protect the registry. The sad part is that after spending hours reinstalling the operating system and incumbent applications, I discovered an easy fix for the problem. Most of these tools have a higher calling than just backing up and protecting the registry.

System Restore ensures that you can roll back the configuration of Windows XP to an earlier snapshot, which the operating system makes automatically. Pick the one or two techniques that work for you and stick with them. I prefer to save keys to hive files before making changes to the registry, but you might prefer to make backup copies of individual values.

Also, you definitely want to know about System Restore and how to fix troublesome settings. The last part of this chapter describes the advanced troubleshooting tools, which you turn to only when things are so fouled up that you have no other choice.

Many of these tools require advance preparation. For example, to restore a backup copy of the registry, you must have made a backup. Likewise, to use Automated System Recovery, you must have created the disk. The first is making backup copies of values, which you can quickly restore in the registry.

Backups also document the changes you make. The third method and my first choice when making significant changes is to export branches to hive files.

System Restore can get you out of trouble most of the time; it fails only when Windows XP is so far gone that it no longer starts properly. Tip Do you find yourself making the same changes over and over again?

I tend to customize the same settings every time I install Windows XP or every time I log on to a computer and get a new user profile. Test the script carefully so you can apply it with assurance that it works properly.

Test them againevery time you change them. Copying Single Values The easiest way to leave a way out if things go wrong is to make backup copies of values before changing them. Then add a new value using the original name and type, but with new data. The effect is the same, and you can always restore the value by restoring its name. This is your Undo feature. Print or save your screenshot for future reference. Your settings are tucked away safely, and you can edit that branch knowing that restoring the original values will be easy.

Restoring your backup REG file is easy, too. Type the name of the REG file that contains your settings, and then click Open. No No. You can back up and restore keys for other users. On the File menu, click Connect Network Registry, and type the name of the computer containing the registry you want to open.

When you import a hive file containing a key, Regedit completely replaces the current key and all of its subkeys with the contents of the hive file. That means that Regedit removes any value you added since backing up the registry to a hive file. This is a far more accurate way to back up branches before editing them. Exporting branches to hive files is similar to exporting them to REG files; you just pick a different file type.

Reverse the process to restore your settings: Click File, Import; then click Registry Hive Files in the Save As Type list, type the name of the hive file to which you backed up your settings, and then click Open. You can use any file extension you like, but I prefer to give hive files the. Unloading the hive file just unlinks the file from the registry.

You can unload only hive files you manually loaded and not hive files Windows XP loaded. Whereas importing a hive file is a great way to restore an entire branch, loading a hive file is a good method to restore settings surgically or just to check an original value.

Examine the setting in the hive file you loaded, or even copy the backup setting and then paste it over the current value. You can also use it to restore, load, and unload hive files. With Reg. See Chapter 9 for a full explanation of all the different options. Description Save the branch starting with the key keyname to the hive file called filename. Windows XP and most applications are incredibly resilient, though, so fixing a problem is a simple matter of telling it to heal thyself.

This is tantamount to uninstalling and reinstalling an application. Contact Us. Upload eBook. Privacy Policy. New eBooks. Search Engine. Inside, you'll learn to customize Windows XP, optimize the network, and avoid scores of potential disasters, all by working with registry settings. If you're a power user, a system administrator, programmer, or consultant, this guide is absolutely essential.

Managing The Windows Registry.



0コメント

  • 1000 / 1000