User Profile Setup

User profile support is present in all file system configurations. No components need to be added to use user profiles. However, the choice of registry type and registry settings can affect the behavior of user profiles.

With the RAM-based registry, every user shares the same settings. All data under HKEY_CURRENT_USER registry key pertains to all users.

The case is different with the hive-based registry. When a new user is logged on, a new hive is created for that user with a separate file for the user profile. This is called the user profile hive. A user's hive contains specific registry information pertaining to that user's applications, desktop, environment, network connections, and printer settings. The user profile hive contains all data under the HKEY_CURRENT_USER key. When the current user is logged off and another user is logged on, the new user's hive is mounted and the data under HKEY_CURRENT_USER changes.

With both registry types, a directory is created for each user that contains the files that pertain to that user, including, if applicable, the user hive. For more information, see User Profile Storage.

The OEM can start the system with a default user or with no current user. This supports OEMs who need the hive-based registry but who do not need separate user profiles.

The default user is a user with the name default that is logged on when the device boots. The default user can be logged off and another user logged on, depending on the type of registry used. The new user may or may not share data with the default user. Typically, a default user is used only in a single-user environment.

OEMs can set the following registry value so that the system will boot with no user logged on.

[HKEY_LOCAL_MACHINE\init\BootVars]
    "NoDefaultUser"=dword:1

If the hive-based registry is used, HKEY_CURRENT_USER will be empty. After booting with no user, you can call SetCurrentUser to log on a user. The default user hive to load is determined by the value of DefaultUser, a REG_SZ value in HKEY_LOCAL_MACHINE\init\BootVars. The DefaultUser is set to the name of the user to use as the default profile when the system boots. If it is an existing user, the appropriate user hive is loaded. If it is a new user, the user profile is created. If DefaultUser is not set, the default user profile is loaded. It does not block future calls to SetCurrentUser.

OEMs can set the following value so that the system will boot with a default user already logged on.

[HKEY_LOCAL_MACHINE\init\BootVars]
    "DefaultUser"=<username>

The user will be named default, but there will be no user data BLOB associated with the default user.

See Also

User Profiles | User Profile Storage | User Management

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.