[IncludeBorders/top.htm]

Modifying The System Registry

This page describes the steps you need to take to manually examine or modify the System Registry. For VB code that modifies the Registry, see the Functions For Working With The Registry page.

The System Registry, introduced with Windows95, is essentially a database that contains startup and configuration data for all the application programs on your system (e.g., Microsoft Excel) and for Windows itself.  At times, it may be necessary to view and possibly change the values stored in the Registry. For example, to change or delete settings for COM Add-Ins that are installed for use by all users of the machine requires that you examine and change certain Registry keys and values. The Registry is organized in a hierarchical structure, quite similar to the Windows file system. Instead of folders and subfolders, the Registry contains keys and subkeys. Instead of files, the Registry has named values. Just as a folder may contain any number of subfolder, and those subfolder themselves contian subfolder, a Registry key may contain any number of subkeys, and those subkeys themselves may contain subkeys and named values.   For example, the key

HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins

contains a number of subkeys, one for each add installed COM Add-In, and each add-in's key contains named values such as "LoadBehavior" that determine how an add-in is to be started.

A named value is an entry in the Registry that has a name and an associated value. The named value "LoadBehavior" of an add-in's key contains a DWORD (32-bit integer, the same as a VBA Long variable) value that determines how the add-in starts up.

You use the RedEdit program to view and modify the System Registry. To run RegEdit, go to the Windows Start menu, choose Run, and enter RegEdit.

Caution is the watch word when working with the Registry. All the changes you make to the Registry are done "live". That is, when you change or delete a key or named value using RegEdit, that change is made directly and immediately to the Registry itself; there is no "Undo" function nor is there any "Exit Without Save" option. Once you change or delete an entry in the Registry, that entry is permanently changed.  If you delete or modify the wrong key or named value, or give an invalid value to a named value, an application program may be unable to start up or may behave incorrectly. In the worst case scenario, you might be unable even to start Windows itself.

If you are unfamiliar with the Registry and RegEdit, it is strongly recommended that you make a backup copy of the Registry prior to making changes, and/or use System Restore to create a restore point. To save a copy of the Registry, run RegEdit, go to the File menu, and choose Export. In that dialog, give the export file a meaningful name and select the "All" option in the "Export Range" option.  To create a System Restore point, go to the Windows Start menu, choose "Programs" then "Accessorties" then "System Tools" then "System Restore". As an alternative, you may enter the following in the Run command or the Windows Start menu:

%SystemRoot%\system32\restore\rstrui.exe

A Restore Point is a snapshot of the current state of the system. If you find that you have incorrectly modified or delete a key or named value, you can run System Restore and choose "Restore my computer to an earlier time" to restore the setting that were incorrectly modified.
 

  As shown in the image to the left, the Registry is made up of 5 major divisions. Unless you know exactly what you are doing, you should modify keys and values only in "HKEY_CURRENT_USER"  and possibly "HKEY_LOCAL_MACHINE". You should never modify keys or values in the other sections of the Registry.  
 
With RegEdit, you can view and modify the Registry settings by expanding the nodes of the tree by clicking the "+" controls to expand the view to the desired key.
 
 
The image to the left shows the Registry view expanded  to the key

HKEY_CURRENT_USER\Software\
Microsoft\Office\Excel\Addins\
AdvanceFunctionLib.Connect

This key contains named values that describe and control an Excel COM Add-In name "AdvanceFunctionLib" with ProgID of

AdvanceFunctionLib.Connect
 

 
 
 
 
     
[IncludeBorders/bottom.htm]