HKEY_CURRENT_USER contains the database that describes the user profile for the user who is currently logged on to the local computer. A user profile contains information that defines the appearance and behavior of the individual user's desktop, network connections, and other environment settings. A user profile ensures that Windows NT looks and acts the same at any computer where that user logs on, if that person's profile is available at that computer or on the same domain in Windows NT Server.
HKEY_CURRENT_USER contains all the information necessary to set up a particular user environment on the computer. This includes information about settings such as application preferences, screen colors, and other personal preferences and security rights. Many of these settings are similar to the information that was stored in the Win.ini file under Windows for MS-DOS.
HKEY_CURRENT_USER includes the default subkeys described in Table 23.8. For details about the contents of subkeys in HKEY_CURRENT_USER, see Regentry.hlp, the Registry Help file on the Windows NT Workstation Resource Kit CD.
Table 23.8 Default Subkeys in HKEY_CURRENT_USER
Subkey | Contents |
AppEvents | Subkeys that define application events, including the sound scheme, the set of relationships between user actions and the sound produced by the computer. |
Console | Subkeys that define the options and window size for a console (the interface between the user-mode and character-mode applications). This includes settings for the Windows NT command prompt. These settings should be changed by using the commands in the Control menu of each non–Windows-based application. |
Control Panel | Subkeys that correspond to parameters that can be changed by using the options in Control Panel. This includes information that was stored in the Win.ini and Control.ini files under Windows for MS-DOS. |
Environment | Value entries that correspond to the current user's settings for environment variables. This includes information that was stored in the Autoexec.bat file under MS-DOS. Values should be set by using the System option in Control Panel. |
Keyboard Layout | Subkeys that specify the language used for the current keyboard layout. To change the language associated with the keyboard, use the Input Locales tab under the Keyboard option in Control Panel. |
Network | This key is no longer used. (In previous versions of Windows NT, it stored persistent connections. Persistent connections are now stored in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Network\Persistent Connections.) |
Printers | Subkeys that describe the printers installed for the current user. To change printer values, click the Start button, point to Settings, then point to the Printers folder. |
Software | Subkeys that describe the current user's configurable settings for installed software that the user can use. This information has the same structure as HKEY_LOCAL_MACHINE\Software. This information contains application-specific information that was stored in the Win.ini file or private initialization files under Windows for MS-DOS. |
UNICODE Program Groups | This subkey is not used in Windows NT 4.0. If the computer was upgraded to Windows NT 4.0 from a previous version of Windows NT, this subkey might contain old subkeys in binary form. However, neither this subkey nor any subkeys it contains holds valid data used by Windows NT 4.0. |
Windows 3.1 Migrations Status | This subkey contains data only if the computer has been upgraded from Windows 3.x to Windows NT 4.0. It contains the subkeys that indicate whether Program Group (.grp) and .ini files have been successfully converted to the Windows NT 4.0 format. If you delete this key, Windows NT tries to convert the files again when the system restarts. There is also a Windows 3.1 Migration Status subkey under HKEY_LOCAL_MACHINE\Software that tracks the conversion of .ini and Reg.dat files to the Windows NT format. |
Whenever similar data exists in the HKEY_LOCAL_MACHINE subtree and the HKEY_CURRENT_USER subtree, the data in HKEY_CURRENT_USER takes precedence, as described earlier in "HKEY_LOCAL_MACHINE." The most significant example is environment variables, where variables defined for the user who is currently logged on take precedence over system variables. Use the System option in Control Panel to define system variables.
HKEY_CURRENT_USER is mapped to HKEY_USER\SID_#, where SID_# is the Security ID string of the current user. The Windows NT logon process builds a user's personal profile environment based upon what it finds in HKEY_USER\SID_#. If no such data is available, HKEY_CURRENT_USER is built from the data in Systemroot\Profiles\Default User\Ntuser.dat.
Note
To find the name of the file that goes with a hive, see the HiveList subkey in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control. To find which hive file goes with a user profile (whether or not the user is logged on), see the ProfileList subkey under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion. To locate a specific subkey quickly, you can use the Find Key command from the View menu in Registry Editor.