How Windows 2000 Syncs Roaming Profiles at Logoff

This article provides an overview of how Microsoft Windows 2000 handles roaming user profile synchronization during the logoff sequence. It covers the unloading of user registry hives, file-by-file timestamp comparisons against the network share, the "last writer wins" conflict resolution model, and how local cache policies govern the final cleanup process.

1. Application Shutdown and Registry Unloading

The logoff process begins when the user initiates logoff, prompting the operating system to send termination signals to all running user-mode applications. Once processes close, Windows 2000 flushes the contents of the HKEY_CURRENT_USER registry branch to disk, writing the data into the local NTUSER.DAT file. The operating system then unloads the user's registry hive to ensure the file is unlocked and ready for network transfer.

2. Timestamp and File Comparison

Windows 2000 does not perform a blind, full-folder copy of the entire profile back to the server. Instead, the local profile engine connects via Server Message Block (SMB) to the profile path specified in the user’s Active Directory account properties (typically \\Server\Share\%Username%). It performs a file-by-file comparison between the locally cached profile directory and the central network copy:

  • Modified Files: Files with a newer local timestamp than the server copy are marked for upload.
  • New Files: Files created during the session are marked for transfer.
  • Deleted Files: Files that existed on the server at logon but were deleted locally during the session are removed from the server share.
  • Excluded Directories: Folders designated as non-roaming (such as Local Settings, History, and Temp) are omitted entirely from the synchronization routine.

3. File Transfer to the Profile Share

After establishing the delta, the local engine copies modified and newly created files over the network to the server share. The local system writes directly over the existing versions on the file server. Because Windows 2000 copies entire files rather than binary deltas or blocks, large files that underwent minor modifications will still be re-uploaded in their entirety.

4. Handling Conflicts: "Last Writer Wins"

Windows 2000 uses a simplistic "last writer wins" strategy to handle roaming profile concurrency. If a user logs into multiple Windows 2000 workstations simultaneously, each machine downloads the profile upon logon. When logging off, the workstation that terminates its session last will overwrite any changes committed by earlier logoffs on other workstations, regardless of when specific documents or settings were edited.

5. Local Cache Disposition

Once the upload finishes successfully, Windows 2000 evaluates Group Policy settings to determine what to do with the local profile copy on the workstation:

  • Default Behavior: The profile remains cached on the local hard drive to speed up future logons by the same user.
  • Delete Cached Copies Policy: If the policy Delete cached copies of roaming profiles is enabled, the system purges the local profile folder completely once the network sync is confirmed.

Registry Lock Issues

A frequent issue during Windows 2000 logoffs occurs when background services or third-party drivers keep open handles on the HKEY_CURRENT_USER key. If a handle remains open, the operating system cannot unload NTUSER.DAT. Consequently, the synchronization of registry settings fails or stalls, causing Windows 2000 to log off using an incomplete sync or leaving behind orphaned profile registries on the local workstation.