The HKEY LOCAL MACHINESOFTWARE Key

The HKEY_LOCAL_MACHINE\SOFTWARE Key

The HKEY_LOCAL_MACHINE\SOFTWARE registry key contains configuration data concerning the software installed on the local computer. Settings that reside under this key contain settings for the software installed on the local PC and are in force for any user who's logged on to the local system.

The HKEY_LOCAL_MACHINE\SOFTWARE\Classes key contains filename extension association data. It also stores registry data associated to COM objects. The data stored under the Classes key is also displayed under HKEY_CLASSES_ROOT. Fig. 7.10 shows the typical contents of the HKEY_LOCAL_MACHINE\Software registry key.

click to expand
Fig. 7.10: Typical contents of the HKEY_LOCAL_MACHINE\SOFTWARE key

The HKEY_LOCAL_MACHINE\SOFTWARE subtree contains several nested keys, the most important being the Classes, Program Groups, and Secure subkeys.

Later in this chapter, we'll discuss several <Description> subkeys that may appear in the registry.

The Classes Subkey

The parameters contained under this key are the same as the parameters stored under HKEY_CLASSES_ROOT. Detailed information on the contents of this key is provided in the "OLE Programmer's Reference" document included with Windows Platform Software Development Kit. The HKEY_LOCAL_MACHINE\SOFTWARE\Classes key contains subkeys of the following types:

  • Subkeys of the <Filename-extension> type associate applications installed on local computers with file types (identified by filename extensions). These subkeys contain data that you can add using the File Types tab of the Folder Options window (Fig. 7.12), as well as information added by the Setup programs that install Windows applications. The keys also contain information on the applications installed by Windows NT/2000 applications. The example shown in Fig. 7.11 shows the file association between AVI files and the Windows Media Player application. The screenshot (Fig. 7.12) shows the registry key that corresponds to the association (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi).

    click to expand
    Fig. 7.11: The File Types tab of the Folder Options window

    click to expand
    Fig. 7.12: The contents of the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi registry key, which corresponds to the AVI filename association

  • <Class-definition> subkeys. These subkeys contain information associated with COM objects. The data contained within these keys specifies the shell and OLE (COM) properties for specific objects. If the application supports DDE (Dynamic Data Exchange), the Shell subkey may, in turn, contain other subkeys such as Open and Print. The subkeys define DDE commands for opening and printing files. Notice that the information contained under these keys is very similar to the information stored in the registry database of previous Windows versions, such as Windows 3.1x Fig. 7.13 illustrates the shell properties for the AVI file.

click to expand
Fig. 7.13: The shell properties for the AVIFile class under HKEY_LOCAL_MACHINE\Classes

Note 

The COM object information contained in the registry must be created by an application supporting COM. Direct registry editing can't be considered the easiest method of editing the information. If you need to perform this task in Windows NT 4.0, select the Options command from the View menu in Windows NT Explorer, then go to the File Types tab of the Options dialog. If you need to perform the same task in Windows 2000 or Windows XP, start the Folder Options applet from the Control Panel, or select the Folder Options command from the Tools menu in Windows Explorer; then go to the File Types tab in the Folder Options window.

The Description Subkeys

The HKEY_LOCAL_MACHINE\Software\Description keys contain names and version numbers of the software installed on the local computer. (Configuration settings specified for individual users are stored under HKEY_CURRENT_USER.)

During installation, applications register this information in the following form:

   HKEY_LOCAL_MACHINE\Software\Description\CompanyName\ProductName\ Version.   

Note 

Version information for each application must be added to the registry by the appropriate application. Don't edit values under these keys except when the application vendor instructs you to do so.

An example illustrating how the registration information of an application (F-Secure anti-virus in our case) is stored under the HKEY_LOCAL_MACHINE\SOFTWARE registry key is presented in Fig. 7.14.

click to expand
Fig. 7.14: An example of application registration information under HKEY_LOCAL_MACHINE\Software registry key

The Microsoft Subkey

The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft subkey contains configuration settings for Microsoft software products installed on the local computer.

One of the most important subkeys under HKLM\SOFTWARE\Microsoft is the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion key. This key contains information on the software that supports Windows built-in services and the type and version number of the current Windows NT/2000/XP installation (for example, the data specifies whether the system has a multiprocessor kernel). Obviously, a single-processor Windows NT/2000/XP kernel will work on a multi-processor computer, but it won't provide any advantages over the single-processor configuration. To identify the kernel type, view the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion (Fig. 7.15).

click to expand
Fig. 7.15: The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS NT\CurrentVersion registry key

Note 

When speaking about the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion registry key, it is simply impossible not to mention one of the most appreciated Windows XP performance enhancements introduced with this version of the operating system. Windows XP provides built-in user mode heap-leak detection. The problem is that poorly written or miscoded applications can "leak" heap memory. In versions before Windows XP when this situation arose, special tools were needed to help identify the cause of the memory leak. To enable leak detection, set the following registry key:

   [HKEY_LOCAL_MACHINE SOFTWARE\Microsoft\Windows NT\CurrentVersion\ Image File   Execution Options\ImageName] "ShutdownFlags"="3" 

The Program Groups Subkey

The Program Groups subkey, residing under the HKEY_LOCAL_MACHINE\Software registry key, has undergone some changes in comparison to previous versions of Windows NT (Windows NT 3.51 and earlier). In Windows NT 4.0, this key was redefined. In earlier Windows NT versions, the key contained a list of program groups used by all users of the local computer. In Windows NT 4.0 and Windows 2000/XP, this key is only used to specify whether or not all the program groups that existed in the previous operating system (for upgraded systems) were converted to a new format.

The Program Groups key contains a single entry named ConvertedToLinks, which determines whether the program groups have been converted. If the ConvertedToLinks value is set to 1, the conversion has been completed successfully.

If you install a fresh copy of the operating system rather than upgrade an earlier version to Windows XP, the Program Groups subkey won't contain any subkeys. If you've performed an upgrade, the Program Groups key will contain subkeys containing binary data defining general program groups.

The Secure Subkey

Applications can use the Secure subkey for storing configuration settings that can only be changed by the system administrator.

The Windows 3.1 Migration Status Subkey

The Windows 3.1 Migration Status subkey contains data only if the current operating system was installed as an upgrade from Windows 3.1. The parameters contained in this key specify if all INI files and the registry database (Reg.dat) were successfully converted to the Windows NT 4.0/Windows 2000 registry format. If you delete this key, Windows will make another attempt to convert these files after reboot.

Windows 3.1 Migration Status also exists under HKEY_CURRENT_USER. It specifies the conversion status of the program groups files (GRP files) to the Windows Explorer program group format.



Windows XP Registry
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: N/A
EAN: 2147483647
Year: 2000
Pages: 144
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net