This class is the starting point
when using the Windows registry,
which is the central repository used by most Windows applications for
storing user-specific settings and preferences. Each static field of
this class represents a root RegistryKey object,
which has values and multiple levels of subkeys. These keys are
read-only, but can be manipulated using the methods of the
RegistryKey class.
Most applications store their settings in
CurrentUser (HKEY_CURRENT_USER). The recommended
standard is to use the Software subkey, create a
subkey for your organization, and then create a subkey for each
specific application (for example, Internet Explorer preferences are
stored in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer).
Analogous global settings that should affect all users on the current
computer can be placed in a similar subkey in
LocalMachine (HKEY_LOCAL_MACHINE). For example,
setup programs often use this key to store information about
installed applications. The full collection of user settings for all
the users of the current computer can be retrieved from the
Users key, as can the default settings for new
users, which are contained in the .DEFAULT subkey
of users. CurrentUser is actually a mapped subkey
of Users, much as CurrentConfig
is a subkey of LocalMachine.
The ClassesRoot key contains information used for
Windows 3.1-compatible DDE and OLE support. Information for file
viewers, Windows Explorer extensions, and file associations is also
stored in this key. You can use the
PerformanceData key to retrieve
performance-related information. This data is not actually stored in
the registry. Instead, it is automatically collected from the
appropriate system object managers when this key is accessed. Lastly,
the DynData key is used to support Virtual Device
Drivers (VxDs) and allow them to provide real-time data to remote
Win32 applications. It is used only in Windows 95, 98, and ME
systems.
Much more information about the system registry is available from
Microsoft's Windows platform documentation.
public sealed class Registry {
// Public Static Fields
public static readonly RegistryKey ClassesRoot;
// =HKEY_CLASSES_ROOT [0x80000000]
public static readonly RegistryKey CurrentConfig;
// =HKEY_CURRENT_CONFIG [0x80000005]
public static readonly RegistryKey CurrentUser;
// =HKEY_CURRENT_USER [0x80000001]
public static readonly RegistryKey DynData;
// =HKEY_DYN_DATA [0x80000006]
public static readonly RegistryKey LocalMachine;
// =HKEY_LOCAL_MACHINE [0x80000002]
public static readonly RegistryKey PerformanceData;
// =HKEY_PERFORMANCE_DATA [0x80000004]
public static readonly RegistryKey Users;
// =HKEY_USERS [0x80000003]
}