Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

MW-Menu

 

Free Visual BASIC Newsletter

Features

Tips

Sample Code

Newsletters

Products

ActiveX

Cool Links

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The Windows Registry: from the Ground Up

How Data is Stored in the Windows Registry

As previously mentioned data in the Windows Registry is stored is a hierarchical structure. This section will explain in more detail about this structure and how data is stored.

If you run the RegEdit.exe program from the command line or the windows directory you will see the following:

regedit.gif (7678 bytes)

You will see that there are six branches (seven if running Windows NT) breaking off from My Computer.

HKEY_CLASSES_ROOT – This is the only branch which was also in the Windows 3.1 & 3.11 which stores information about shortcuts, file extensions, licences for ActiveX control and objects and well as information of OLE automation. This is the branch that you would use if you wanted to add information to the ‘File’ menu as in every folder windows in the Operating System. You may see what I mean if you have Winzip installed and you right click on a file you will see options like ‘Add to Zip’. This is stored in the HKEY_CLASSES_ROOT Branch of the registry

This part of the registry is mostly used with associating files with applications and as you can see in the picture below a file with the *.reg extension has a open command with the Regedit program and a %1 besides it which represents the file name. This will be very useful when developing applications that requires opening of files.

HKEY_CURRENT_USER – This branch is where information which is only specific to the user who is logged on to the machine or the stand-alone user is User profiles are not used on your computer. The information here is basically the same as in the HKEY_LOCAL_MACHINE. Branch but only for the current user. For more information on this branch please see the information on HKEY_LOCAL_MACHINE.

HKEY_LOCAL_MACHINE This branch is the main part of the registry that you the Visual Basic developer will be interested in as it contains lots of information on the state of the local machine (your current machine that you are using). Unlike the HKEY_CURRENT_USER the information here is used no matter who is logged onto the machine and what software that may be in use. The main branch (node) of the tree has the following branches if you open up the HKEY_LOCAL_MACHINE branch which are

  • Config – Contains the hardware configurations for the current (local) machine that is being used.
  • DesktopManagerment – Contains information on Management features, which you will not find very useful as a Visual Basic developer.
  • Enum – Contains information on the hardware that is installed on the current (local) system.
  • Hardware – Contains information on the communication and printer parallel ports on the current machine
  • Network – Contains information about the users who are logged on the current machine, which includes username, primary network provider, whether the user was validated by a network server and information on how the system policies are performed.
  • Security – Contains information on either the network security provider or the individual machines security system.
  • Software – This is one of the most important branches as it contains information on the software that is installed on your machine. This is the section that you will most likely use with your applications. There is information on the settings of the Operating system such as the registered owner, serial number etc. The samples that I will show you will use data from this section of the registry.
  • System – This is a very important section of the registry as it contains the settings used when the computer is starting up and the way that device drivers are loaded and in general Windows behaviour.

HKEY_USERS This branch contains information on all the users who log on to the current computer.

HKEY_CURRENT_CONFIG This section contains information on the hardware that is currently installed on the current system.

HKEY_DYN_DATA This contains information on Plug and play devices as well as the System State of all hardware attached to the current system.

Now that I have explained the basics of the registry, this will help you in using it with your own applications.

HKEY_PERFORMANCE_DATA This is for Windows NT only.

Now that you have an insight into the registry and where different information is stored, we will move onto the next section, which will teach you about the Registry and Visual Basic.

<< Back                                                                                   Next >>

___________________________________________

Send Bugs, comments to the webmaster at webmaster@mwe.8m.com

Terms of Use

© 1999 MW Software, all rights reserved