| The Windows Registry: from the Ground UpHow 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:
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 registryThis 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
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. |
___________________________________________ Send Bugs, comments to the webmaster at webmaster@mwe.8m.com © 1999 MW Software, all rights reserved |