Friday, January 09, 2009   
  Search   
 
Register  Login  
Forums  
     Minimize  

Welcome to MeraWindows forums.

Thank you for being at the Microsoft Windows Community Site. You may have to register before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  


 
  Microsoft Windows Forums  Other Windows V...  Windows XP  Understanding Windows Registry
Previous Previous
 
Next Next
New Post 7/16/2007 8:10 PM
User is offline Piyush Gupta
1834 posts
www.piyushworld.com
MW Addict


Understanding Windows Registry  
Modified By Vishal Gupta  on 7/16/2007 8:24:52 PM)

This is my first tutorial here and I have put lots of efforts in it. I have compiled this tutorial myself and I also took a little help from Wikipedia to cover eveything. 

 

What is the registry?

The Registry is a database used to store settings and options for the 32 bit versions of Microsoft Windows including Windows 95, 98, ME, NT/2000, XP and Vista. It contains information and settings for all the hardware, software, users, and preferences of the windows OS. Whenever a user makes changes to a Control Panel settings, or File Associations, System Policies, or installed software, the changes are reflected and stored in the Registry.

The physical files that make up the registry are stored differently depending on your version of Windows; under Windows 95, 98 & ME it is contained in two hidden files in your Windows directory, called USER.DAT and SYSTEM.DAT, while under Windows NT/2000 the files are contained separately in the %SystemRoot%\System32\Config directory. You can not edit these files directly; you must use a tool usually known as a "Registry Editor" to make any changes

The Structure of the Registry

The Registry has a hierarchal structure, although it looks complicated the structure is similar to the directory structure on your hard disk, with Regedit being similar to Windows Explorer.

Registry divided into hives

The five Registry hives

HKEY_CLASSES_ROOT

This mostly contains information about file types and file name extensions. It tells windows how to handle the different file types and which user interface options to use.

HKEY_USERS

Here's where the system keeps information about every user on the system.

HKEY_CURRENT_USER

This hive contains system setup info for the machine's current user. This includes things such as desktop preferences, printers, and security settings.

HKEY_LOCAL_MACHINE

This hive stores information about the computer itself and the hardware attached to it, such as keyboards, storage, and such.

HKEY_CURRENT_CONFIG

Here's the hive that keeps current hardware configurations during the active session.

Registry hive

Supporting files

HKEY_LOCAL_MACHINE\SAM

Sam, Sam.log, Sam.sav

HKEY_LOCAL_MACHINE\Security

Security, Security.log, Security.sav

HKEY_LOCAL_MACHINE\Software

Software, Software.log, Software.sav

HKEY_LOCAL_MACHINE\System

System, System.alt, System.log, System.sav

HKEY_CURRENT_CONFIG

System, System.alt, System.log, System.sav, Ntuser.dat, Ntuser.dat.log

HKEY_USERS\DEFAULT

Default, Default.log, Default.sav

 

 

 

Using keys and values

Underneath each hive are keys that can contain subkeys, and those subkeys can have subkeys, and so on and so on.

Keys and subkeys contain values. That's how the Registry controls things. Change the values and you change the thing the key controls.

Here are the five primary data types in a Registry.

* REG_SZ (string value) -- numbers and text
* REG_MULTI_SZ (string array value) -- numbers and text you can edit but not create
* REG_EXPAND_SZ (expanded string value) -- usually points to the location of files
* REG_BINARY (binary values) -- binary data
* REG_DWORD (DWORD values) -- a hexadecimal data type

 


Read Forum Guidelines before posting

 
New Post 7/16/2007 8:12 PM
User is offline Piyush Gupta
1834 posts
www.piyushworld.com
MW Addict


Re: Understanding Windows Registry  

Locations of registry

The Registry is stored in several files; depending upon the version of Windows, there will be different files and different locations for these files, but they are all on the local machine, except for the Ntuser.dat file, which may be placed on another computer to allow for roaming profiles and the policy file, which is usually stored on a server in the local network.

Windows NT, 2000, XP, Server 2003, and Vista

The following Registry files are stored in %SystemRoot%\System32\Config\:

  • Sam – HKEY_LOCAL_MACHINE\SAM
  • Security – HKEY_LOCAL_MACHINE\SECURITY
  • Software – HKEY_LOCAL_MACHINE\SOFTWARE
  • System – HKEY_LOCAL_MACHINE\SYSTEM
  • Default – HKEY_USERS\.DEFAULT
  • Userdiff

The following files are stored in each user's profile folder:

  • %UserProfile%\Ntuser.dat – HKEY_USERS\<User SID> (HKEY_CURRENT_USER)
  • %UserProfile%\Local Settings\Application Data\Microsoft\Windows\Usrclass.dat (path is localized) – HKEY_USERS\<User SID>_Classes (HKEY_CURRENT_USER\Software\Classes)

Windows 95, 98, and Me

The registry files are named User.dat and System.dat and are stored in the C:\WINDOWS directory. In Windows ME, Classes.dat was added.

To edit the Registry, use the Registry Editor

OK, time again to warn you. Don't play with the Registry unless you know what you're doing. You can really mess stuff up. To run the Registry Editor, go to the Run box in Windows and type "regedit" (without quotes), then press Enter.

The Registry Editor works like Windows Explorer. Changes you make take effect either right away or after a reboot. Keep in mind though that every change you make is permanent. There's no undo button. Did we mention being careful? Be careful!


Read Forum Guidelines before posting

 
New Post 7/16/2007 8:13 PM
User is offline Piyush Gupta
1834 posts
www.piyushworld.com
MW Addict


Re: Understanding Windows Registry  
Modified By Vishal Gupta  on 7/16/2007 8:29:19 PM)

Locating a subtree, key, subkey, or value

There are five top-level registry subtreesEach of them starts with "HKEY." In the following example, HKEY_LOCAL_MACHINE is the subtree, SOFTWARE is the key, and Microsoft is the subkey.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft

In Registry Editor, you can search through the keys and subkeys in the same way that you search through your folders in Windows Explorer.

The keys and the subkeys are listed in a folder tree in the left pane of Registry Editor. If you click a key or a subkey in the left pane, information about the value name, the value type, and the value data appears in the right pane.

As in Windows Explorer, each folder may be expanded by clicking the plus sign (+) that is next to it. After a folder is expanded, the plus sign changes to a minus sign (-).


To locate the Microsoft subkey, follow these steps:

 

1. Click Start, click Run, type regedit, and then click OK.

2. Expand HKEY_LOCAL_MACHINE.

3. Expand SOFTWARE.

4. Click Microsoft.

Note When you click the Microsoft subkey, its values appear in the right pane. To view the next lower level of subkeys, expand the Microsoft subkey. To locate a value, click the subkey that contains the value, and then view the contents of the right pane.

Adding a key

To add a new subkey named TestSubkey to the Microsoft subkey, follow these steps:

1. Expand HKEY_LOCAL_MACHINE.

2. Expand SOFTWARE.

3. Click the Microsoft subkey.

4. On the Edit menu, point to New, and then click Key.

5. Type TestSubkey, and then press ENTER.

Adding a value

To add a new DWORD Value named TestDWORD and to set its value data to 1 in the TestSubkey key, follow these steps:

1. Expand HKEY_LOCAL_MACHINE.

2. Expand SOFTWARE.

3. Expand Microsoft.

4. Click the TestSubkey subkey.

5. On the Edit menu, point to New, and then click DWORD Value.

6. Type TestDWORD and then press ENTER..

7. Right-click the TestDWORD DWORD Value, and then click Modify.

8. Type 1, and then click OK.

Changing a value


To change the value data for the TestDWORD DWORD Value to 0 in the TestSubkey key, follow these steps:

1. Expand HKEY_LOCAL_MACHINE.

2. Expand SOFTWARE.

3. Expand Microsoft.

4. Click the TestSubkey subkey.

5. Right-click the TestDWORD DWORD Value, and then click Modify.

6. Type 0, and then click OK.

Manual steps to rename a key or value

To rename the TestSubkeysubkey to Test, follow these steps:

1. Expand HKEY_LOCAL_MACHINE.

2. Expand SOFTWARE.

3. Expand Microsoft.

4. Right-click the TestSubkey key, and then click Rename.

5. Type Test, and then press ENTER.

Deleting a key or value

To delete the TestDWORD DWORD Value in the TestSubkey subkey, follow these steps:

1. Expand HKEY_LOCAL_MACHINE.

2. Expand SOFTWARE.

3. Expand Microsoft.

4. Click the TestSubkey subkey.

5. Right-click the TestDWORD DWORD Value, and then click Delete.

6. Click Yes to confirm that you want to delete the value.

 

I hope you will find it useful.


Read Forum Guidelines before posting

 
New Post 7/16/2007 8:15 PM
User is offline Manan
889 posts
beingmanan.com
Experienced Member




Re: Understanding Windows Registry  

good post ...


It's a Microsoft world kid, I am just living in it.

Read the latest info from all the top Microsoft related blogs at one place: Everything Microsoft

Being Manan.comEverythingMS News Mesh

BeingManan.com | Twitter: manan | Last.FM: manan
 
New Post 7/16/2007 8:31 PM
User is offline Vishal Gupta
6458 posts
www.AskVG.com
Ultimate Member








Re: Understanding Windows Registry  

Thats fantastic dude. You hv covered up approx. all basic things related to registry. I appreciate it.


Tweaking with Vishal

How to Use Smiley Code in Forum?
Promote MeraWindows at Your Blog / Site
Read Forum Guidelines
 
Previous Previous
 
Next Next
  Microsoft Windows Forums  Other Windows V...  Windows XP  Understanding Windows Registry


   Get Your Own E-Mail Account @MeraWindows.com Minimize  
New Page 1 New Page 1
Show your cool quotient with @merawindows.com email account