mainarticles   mainarticles
mainarticles
mainarticles   mainarticles
mainarticles
mainarticles

Home | Computers


Part 2 of editing the registry

By: lowster11
 

Although the registry appears to be one seamless unit when viewed in the Registry Editor, it's actually stored in several pieces. Each piece is called a hive. Hives are stored in \Windows\System32\Config, and are named Default, Sam, Security, Software, and System. The main hive files have no extensions; there are also files with the same names but with .sav extensions (backup copies) and .log extensions (log files), as shown in Figure 4-1. When you restore using Last Known Good Configuration, Windows overwrites the .sav versions with the extension-less versions.
Figure 4-1: Hive files.
Figure 4-1: Hive files.

There's one additional hive file for the current user, NTUser.dat, stored in the \Documents and Settings\<> folder. It differs from the others both in its location and in that it has an extension. It also does not have a .sav version (although it does have a .log version).
There's not a simple one-to-one relationship between the five top-level categories in the Registry Editor and these locations. However, roughly speaking, the first-level folders within HKEY_LOCAL_MACHINE correspond to the hive files of the same names (Sam, Security, Software, and System, as shown in Figure 4-2), and HKEY_CURRENT_USER is stored in NTUser.dat. HKEY_USERS is stored in Default, and HKEY_CURRENT_CONFIG is stored partly in System and partly in NTUser.dat.
You don't need to know the correspondence of the various sections to the hive files; it's just interesting trivia.
Figure 4-2: Folders in HKLM correspond to some of the hive file names.
Figure 4-2: Folders in HKLM correspond to some of the hive file names.

In 9x versions of Microsoft Windows, the entire registry was stored in only two files: System.dat and User.dat.








The Edit String dialog box you just saw represents one type of value. Here are the most common value types used in the registry:

  • String (REG_SZ): Standard string, used for human-readable letters and numbers.
  • Binary (REG_BINARY): Binary numbers (0 or 1) only.
  • DWORD (REG_DWORD): Short for "data word," a four-byte number in either decimal or hexadecimal.

There are many other value types, but you won't be using them much, especially in this course. For a full list of them, take a look at Description of the Microsoft Windows registry article.
You never need to guess as to which type of value to use, because any registry edits you perform will be done from instructions provided that will include the value type.
The Edit dialog box is different depending with which value type you're working. Figure 4-6 shows the Edit String dialog box.
Figure 4-6: Edit String dialog box.
Figure 4-6: Edit String dialog box.

Figure 4-7 shows the Edit Binary Value dialog box.
Figure 4-7: Edit Binary Value dialog box.
Figure 4-7: Edit Binary Value dialog box.

Figure 4-8 shows the Edit DWORD Value dialog box.
Figure 4-8: Edit DWORD Value dialog box.
Figure 4-8: Edit DWORD Value dialog box.


 

 

 


Now let's make a simple change to the registry -- change the default download location for Microsoft Internet Explorer. By default, it's the desktop, but you might want to create a special folder for downloads and direct Internet Explorer there.

  1. Navigate to HKCU\Software\Microsoft\Internet Explorer.
  2. Double-click Download Directory. The Edit String dialog box appears. The default value data set there is the path to your desktop.
  3. Change the path to the desired location. For example, in Figure 4-9, it's set to C:\Temp.

Figure 4-9: Changing a value's data.
Figure 4-9: Changing a value's data.


  1. Reboot.
  2. Go to a Web site where a download is available (such as Download.com) and try downloading an application.

If you make a change to HKCU, and then you can't remember what the original value was, look at the corresponding section in HKU\.DEFAULT, and then update the value in HKCU to match it. HKU\.DEFAULT stores settings on which new user profiles are based, and as such contain the default values for all user-based settings.

Changing a DWORD value


DWORD values are much like strings except they only accept decimal and hexadecimal numbers.
Here's some practice. This tweak displays the full Windows version on the desktop. This feature was turned on by default in beta versions of Windows to help with testing, but it's off by default in the release product. After turning it on, you might decide you want to turn it off again, and that's fine.

  1. In the Registry Editor, navigate to HKEY_CURRENT_USER\Control Panel\Desktop.
  2. Double-click PaintDesktopVersion. The Edit DWORD Value dialog box appears.
  3. Change the data to 1, as shown in Figure 4-10, and then click OK.

Figure 4-10: Changing a DWORD value's data.
Figure 4-10: Changing a DWORD value's data.


  1. To see the change, reboot, or log off and log on again



Next, let's delete a value. Be very careful when you delete from the registry, because if you have the wrong item selected when you press Delete, you could potentially wipe out an important value or key.
For this practice exercise, you'll clear the drop-down list in the Run dialog box, so others can't see which programs you've been running with the Run command.

  1. Select Start > Run, and open the drop-down list. Notice that the programs you've recently run appear there. Click Cancel.
  2. In the Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU.
  3. For each value except Default in the right pane, select it and then press Delete to delete it.
  4. Reboot. Open the Run dialog box and verify that the program names no longer appear there.

Creating a value


Now let's do one more. By default, Windows allows only two simultaneous connections when downloading files from Internet Explorer. If you have a fast Internet connection and are connecting to several very slow servers, this limitation can hamper your download capability. In the following tweak, you'll bump that up to 10:

  1. Navigate to HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
  2. Select Edit > New, and then click DWORD Value.
  3. The new value appears with a default name. Change it to MaxConnectionsPer1_0Server. If the cursor is not already flashing in the name, press F2 to put it there.
  4. Double-click the new value to open its dialog box, and enter A as the hexadecimal value data. (A represents 10 in hex.) Click OK.
  5. Select Edit > New and click DWORD Value.
  6. The new value appears. Change its name to MaxConnectionsPerServer.
  7. Double-click the new value to open its dialog box, and enter A as the hexadecimal value data. Click OK.
  8. Reboot.
  9. Try downloading multiple files at once from a download site, such as Download.com. You should now be able to start to 10 downloads at once.

Unless you have a fast broadband connection, it's not a good idea to start more than two or three downloads at a time because they start to cut each other's transfer rates and you don't really gain anything; you just increase the likelihood that one of them will time out and have to be restarted.

Article Source: Main Articles

XP How Too's Forum

This article may be reproduced wholly or in part without written permission provided the byline, resource area, and any hyperlinks remain in order to give proper credit to the author.

Internet search engines and directory listings are imperative to your sites existence and success. Submit Your Website to the Searchen Networks directory and search engine to achieve authoritive inbound links.

Please Rate this Article

 

Click the XML Icon Above to Receive Computers Articles Via RSS!
mainarticles
Main Articles. All Rights Reserved. © 2005, 2006
Use of our service is protected by our Privacy Policy and Terms of Service.
mainarticles
 

Powered by Article Dashboard