REGISTRY BASICS IN XP

The registry is essentially a large hierarchical database, like the file system on your PC. A hierarchical database starts with a single entry at the top, and that entry has multiple sub folders beneath it, and those sub folders each have their own sub folders, and so on.

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). When you restore using Last Known Good Configuration, Windows overwrites the .sav versions with the extension-less versions.

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), 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.
nb:In 9x versions of Microsoft Windows, the entire registry was stored in only two files: System.dat and User.dat.


Understanding Registry Keys
The folders in the left pane of the Registry Editor are called keys . Within various keys are values (and sometimes also sub-keys, which are keys-within-keys). A value has two parts: the value name and the value data.


Try the following experiment to see some values:

1. Navigate to the HKCU\Control Panel key. Notice that there are two values in the right pane. Almost every folder has a value named Default. Usually there's no value data set for it. Notice also that there's a plus sign next to Control Panel, indicating it can be expanded in the left pane to see subkeys.
2.Click the plus sign next to Control Panel, and then click Colors. Values for the colors of various screen elements appear in the right pane. Each color is expressed using the RGB color model, with three numbers between 0 and 255. For example, if the Background is set for 0,78,152, it means 0 red, 78 green, and 152 blue.

3. Double-click one of the values, such as Background. An Edit String dialog box appears, with the color number editable.
4. Click Cancel to close the dialog box without saving changes.
nb:The color values in HKCU\Control Panel\Colors apply only when using the Microsoft Windows Classic style in the display properties, not Microsoft Windows XP style. Therefore, changes made might probably not be immediately apparent in the display.

Types of Registry Values

The Edit String dialog box 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, hexadecimal, or binary.

There are many other value types, but you won't be using them much.
nb: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.)


Changing a String Value

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, lets say, it's set to C:\Temp.
4. Reboot.
5. Go to a Web site where a download is available (such as Download.com) and try downloading an application.

nb: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, and then click OK.
4.To see the change, reboot, or log off and log on again.


Deleting a Value

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.
NB: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.

More Simple Edits to Try


Removing the Shortcut Arrows:
When you create a shortcut on the desktop, it has a little arrow on its icon to indicate that it's indeed a shortcut and not a real file. Most people find this helpful, because it avoids any confusion. However, you can turn off the arrow if you prefer.

open the Registry Editor and open HKEY_CLASSES_ROOT\lnkfile. Rename the value IsShortcut to some other name (such as BackupIsShortcut) to get rid of the arrows. You could delete the value entirely to get the same result, but it's better to rename it in case you decide you want to change back again. Reboot to see the change.
Barricading Folders:
The first time you try to access certain folders using Microsoft Windows Explorer, you get a warning that you should not modify the files there. The Windows folder is one, for example, as is the Program Files folder.

Once you access a folder and bypass that warning, that folder's "barricaded" status is removed. If you want to restore a folder's barricade, for example, in preparation for giving the PC to an inexperienced user, you can do so like this:

1. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Explorer\WebView\BarricadedFolders. Each folder that can be barricaded appears listed.
2. Double-click a folder to open its Edit DWORD Value box, as shown in Figure 4-11, and then set the value to 1.
3.Repeat for each folder that you want to reset.

Streamlining the Control Panel:

If there are icons in the Control Panel that you never use, you can hide them. This setting affects only the current user, and is completely reversible. Use the Classic view of the Control Panel to see the results.

1. Navigate to HKEY_CURRENT_USER\Control Panel. If there's not already a key called Don't Load, create one. (Select Edit > New > Key.)
2. Create a new string value with the same name as the Control Panel applet you want to hide. Do not set a value for it. The names of the common applets are as follows:

Access.cpl : Accessibility

AppWiz.cpl : Add/Remove Programs

Desk.cpl : Display Properties

Fax.cpl : Microsoft Fax

Hdwwiz.cpl : Add New Hardware

Inetcpl.cpl : Internet Properties

Intl.cpl : Regional Settings Properties

Irprops.cpl : Infrared

Joy.cpl : Joystick

Main.cpl : Mouse Properties

Mmsys.cpl : Multimedia Properties

Modem.cpl : Modem Properties

Netcpl.cpl : Network Properties

Odbccp32.cpl: 32-bit ODBC Data Source Administrator

Password.cpl : Password Properties

Powercfg.cpl : Power Options

Prefscpl.cpl : RealPlayer Preferences

Sysdm.cpl : System Properties

Themes.cpl : Desktop Themes

Telephon.cpl : Phone and Modem Options

Timedate.cpl : Date/Time Properties
NB:To determine the names of other applets, use Search to search for *.cpl, and then double-click an icon and notice what opens.

3. Reboot to see the changes. If you ever want to restore an icon to the Control Panel, simply delete its value in the Don't Load key. You can also run it as a one-time operation by double-clicking its .cpl file.

There r more such tricks...but without proper knowledge playing wid the registry may harm ur pc!!!

No comments: