The HKEY_CURRENT_USER Key The HKEY_CURRENT_USER registry key contains the data describing the user profile for the user currently logged on to the local system.. The user profile contain
Trang 1The HKEY_CURRENT_USER Key
The HKEY_CURRENT_USER registry key contains the data describing the user profile for the user currently logged on to the local system The user profile contains information defining individual settings for the desktop, network connections, and environment
variables Provided that the user profile for the user exists and is available on the local computer or in the same domain, Windows will look and behave the same way at any workstation where the user logs on to the network
The HKEY_CURRENT_USER registry key contains all the information necessary for setting up the working environment for that particular user It includes the settings and individual preferences for various applications, screen colors, and other user preferences The user profile also includes security settings for the user Many settings existing in HKEY_CURRENT_USER are similar to those that existed in the Win.ini for earlier Windows versions
Standard subkeys of the HKEY_CURRENT_USER are listed in Table 7.3
Table 7.3: Standard Subkeys of the HKEY_CURRENT_USER Registry Key
Subkey Description
set of relationships between user actions, and the sounds produced by your computer as a reaction
size and other settings for console applications A console represents the interface between user-mode and character-mode applications This key also includes settings for the command prompt sessions In Windows
2000 and later, you set command prompt default options-such as window color, cursor size, and font size and style-directly in the command prompt window You can also specify whether the options you set are used for every session or for the current session only
Control Panel The subkeys under the Control Panel subkey correspond to the
parameters that can be changed using Control Panel applets These data also include the information that was stored in the Win.ini file in earlier Windows versions
Environment These settings correspond to the environment variable settings specified
for the individual user who's currently logged on to the system The value entries contain information, which under earlier Windows versions was stored in the Autoexec.bat file Normally, you can set these values using
Trang 2Table 7.3: Standard Subkeys of the HKEY_CURRENT_USER Registry Key
Subkey Description
Control Panel applets
Keyboard
Layout
The subkeys under this key specify the national language used for Layout the current keyboard layout
available for the user currently logged on to the system To change these
settings, click the Start button, then select Settings | Printers
software installed on the local computer and available to the user who's currently logged on to the system This information has the same structure as the HKEY_LOCAL_MACHINE\Software registry key The information also includes application-specific data that was previously stored in the Win.ini file or in application-specific INI files
UNICODE
Program
Groups
This key is provided for backward compatibility It wasn't used in Windows NT 4.0 If your system was upgraded from earlier versions of the Windows NT operating system (for example, from Windows NT 3.51
to Windows NT 4.0), this key may contain some subkeys inherited from the previous versions and store binary data However, neither this key nor its subkeys contain any data needed by Windows NT 4.0/Windows 2000
or Windows XP/Windows Server 2003
Windows 3.1
Migrations
Status
This key will contain data only if you've upgraded your operating system
from an earlier Windows version (for example, from Windows 3.x to
Windows NT 4.0) The subkeys present within this key specify whether the process of upgrading program group files (GRP files) and
initialization files (INI files) has completed successfully If you delete this key, Windows will attempt the conversion next time you reboot the system
Note that the Windows 3.1 Migration Status subkey also exists within the HKEY_LOCAL_MACHINE\Software key
As I mentioned earlier in the section dedicated to the HKEY_LOCAL_MACHINE root key, the HKEY_CURRENT_USER data normally has priority over similar data existing under HKEY_LOCAL_MACHINE For example, let's look at how this convention works for environment variables The environment variable settings defined for the currently logged on user have priority over the system environment variables (use the System applet in Control Panel to set environment variables)
The HKEY_CURRENT_USER key references the HKEY_USERS\<SID_#> registry key, where the <SID_#> is a string containing the security identifier (SID) of the user
Trang 3who's currently logged on to the system The logon process creates the user profile
environment based on the data found under the HKEY_USERS\<SID_#> If this data is
unavailable, the HKEY_CURRENT_USER is built based on the data contained in the
%SystemRoot%\Profiles\Default User\Ntuser.dat file (Windows NT 4.0) or in the
%SystemRoot%\Documents and Settings\Default User\Ntuser.dat file (Windows 2000
and later versions)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control key To find the user profile hive (whether or not this user is currently logged on), view the ProfileList subkey under the
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion key