Enhancements to Roaming User Profiles

In Windows 2000, there are several enhancements that increase the usability and resilience of working with roaming user profiles. These enhancements are part of User Data Management and User Settings Management. The following enhancements are in Windows 2000:

  • Merge algorithm

  • Nonroaming folders

  • Profile location

  • Quotas on profile size

Merge Algorithm

The Windows 2000 merge algorithm supports the merging of user profiles at the file level and support for last writer wins. New files and updated files are not deleted or overwritten. When a document is updated, the new algorithm compares the timestamp of the destination file with the timestamp of the source file. If the destination file is newer, it is not overwritten.

When a user logs on to a computer, the current time is saved; when the user logs off, the timestamp is used to determine which files are new in the server profile and which files have been deleted in the local profile. For example, if the server profile has a document in the My Documents folder called Review.doc and this file does not exist in the local profile, either it is a new file from a different computer, or it was originally in the local profile and the user deleted it. By knowing the time when this new profile was loaded, you can compare it against Review.doc. If Review.doc was created or written to after the profile load time, the file must be preserved because it came from a different source. If the Review.doc timestamp is older than the load time, Review.doc must be deleted because it would have been copied to the local computer at load time.

In addition, some files might need to be removed from the local cache so that items that were deleted between sessions remain deleted. For example:

  1. The user logs on to computer A.

  2. The user creates or modifies a document on computer A.

  3. The user logs on to computer B.

  4. The user logs off computer B; computer B has a copy of the document.

  5. The user deletes the document and logs off computer A.

To make sure that the files are deleted, the cached version of the profile is synchronized with the profile server when a user logs on. All files in the local cache that are not present in the server and that were not modified since the last logoff time are deleted. By using these changes, Windows 2000 can merge user profiles.

Windows   NT   4.0 Merge Algorithm
The merge algorithms for Windows 2000 and Windows NT 4.0 work differently. Windows 2000 does not display a confusing message when you use offline files. The message that appears when you use Windows NT 4.0 prompts the user to pick a local or roaming profile. Windows 2000 also changes how the previous algorithm works.
In Windows NT 4.0, the algorithm is an Xcopy with full synchronization support. That is, it has the ability to mirror a profile from one location to another, and any extra files or directories in the destination location are deleted. The algorithm is based on the concept that there is only one master profile at any one time. When the user is logged on, the master profile is on the local computer. When the user is not logged on, the master profile is on the server. This works well for users who log on to only a single computer; but users who log on to multiple computers at the same time might lose data. A detailed description of the Windows NT 4.0 algorithm is as follows:
1.The user logs on to computer A, the primary computer.
2.The roaming profile is Xcopied from the server location to the local profile location.
For example, change the setting for a Windows NT 4.0–based computer from \\scratch\scratch\alice to C:\winnt\profiles\alice.
3.The user creates documents, changes colors, and so on. All of these changes are stored in the local profile location.
4.As the user logs off the computer, the profile is Xcopied from the local profile location back to the server location.
This is an exact mirroring process. If there are any extra files in the server location, they are deleted to make sure that the server location is a duplicate of the local profile. —

Examples of Windows   NT   4.0 Merge Algorithm Issues
When using Windows NT 4.0, a problem arises if the user has two or more computers. Building on the preceding example:
1.The user logs on to computer A.
2.The user logs on to computer B.
3.The user creates a document on computer A and stores it in the user profile.
4.The user logs off of computer A.
5.The user logs off of computer B.
The document that the user created in step 3 is deleted because, from the perspective of computer B, the master profile is stored locally. The extra files on the server must be deleted so that the local profile is currently the master server profile.
A similar data loss problem occurs when files are modified. For example, suppose that the user has a document called Document.doc in his or her My Documents folder in the server copy of the profile:
1.The user logs on to computer A.
2.The user logs on to computer B.
3.The user modifies the document on computer A.
4.The user logs off computer A.
5.The user logs off computer B.
The changes made to the document on computer A are lost because when the user logged off computer B, the computer overwrote the new version of the document with the old one; the computer is programmed to recognize that it had the master version of the profile. —

Nonroaming Folders

In Windows 2000 and Windows NT 4.0 Service Pack 4, roaming user profiles are copied from the server to the client when the user logs on, and copied back when the user logs off. However, they introduce a per-user local settings folder into the user profile that is not copied during log on or log off sessions. In this folder, operating system components and other applications can store nonroaming per-user data.

For example, Microsoft® Internet Explorer can store a user's Favorites in the roaming portion of the user profile and store the temporary Internet files in the local, nonroaming portion of the user profile. By default, the Temp and Temporary Internet Files folders are excluded from the roaming user profile. You can configure additional folders to not roam by using the Group Policy snap-in:

User Configuration\Administrative Templates\system\Logon/logoff

and select the policy: Exclude Directories In Roaming Profile.

If you enable this policy, you can exclude additional folders. You cannot use the Exclude Directories In Roaming Profile to include the Temp and Temporary Internet Files folders in a roaming user profile.

Profile Location

When no preconfigured server-based roaming user profile exists for a user, the first time that a user logs on to a computer, a user profile folder is created for the user name. The contents of Default User are then copied to the new user profile folder. The user profile, along with the common program group settings in the All Users folder, creates the user's desktop. When the user logs off, any changes made to the default settings during the session are saved to the new user profile folder. The user profile in Default User remains unchanged.

If the user has a user account on the local computer in addition to a domain user account, or if the user has more than one domain user account, the local user profile is different for each account because different user profiles are generated for each user who logs on. When the user logs off, the settings that are changed are saved to only one user profile, that is the profile on the account with which the user logged on.

Table 21.6 shows the profile location changes based on the status of the computer and whether it has a new operating system or if the operating system was based on an upgrade. The profile moves out of the system directory to assist in computer lock-down scenarios. On upgrade computers, the profile does not move. Some applications might have hard-coded paths that break if you move the profile location.

Table   21.6 Default Location for Special Folders That Have Not Been Redirected

Operating System

Location of Special Folders

Windows 2000 new installation (no previous operating system)

% SystemDrive % \ Documents and Settings; for example, C:\Documents and Settings

Windows 2000 upgrade of Windows NT 4.0

% SystemRoot % \ Profiles; for example C:\WinNT\Profiles

Windows 2000 upgrade of Windows NT 3. x , Windows 95 or Windows 98

% SystemDrive % \ Documents and Settings; for example, C:\Documents and Settings

For new installations of Windows 2000, there is a switch to Unatted.txt that you can use to specify the location of the Profiles folder when you install Windows 2000. To do this, set the following in the GUIUnattended section of the unattended file.

profilesdir = "%systemdrive%\profiles"

note-icon

Note

After Windows 2000 is installed, there is no supported way to move the Profiles folder.

Quotas on Profile Size

The Proquota.exe program is a tool that you can set to monitor the size of a user's profile. If an individual user's profile exceeds the predetermined file limit, the user cannot log off from the computer until the user reduces the size of their files.

You can manage the quota size by using the following Group Policy snap-in:

User Configuration\Administrative Templates\system\Logon/logoff

and then select the policy: Limit Profile Size.

If you are combining Folder Redirection of My Documents and roaming user profiles, it is best to not use quotas on the profile. The items that would normally be written to the user profile are done so on behalf of the user by the operating system and applications, so the user is not aware of them. Examples of these files include Custom.dic and Favorites. You can also use the policy that removes cached versions of the profile on logoff, if you are concerned with disk size on a multi-user computer — for example, a public computer where thousands of users can log on.