Windows User Profiles…The Mysteries Untold – Part 1

Estimated reading time: 6 minutes

Thank you for reading this post, don't forget to subscribe! Happy New Year 2024!

Happy New Year Everyone…This is my first blog post of 2017. Woo Hoo!!  As always, I love to blog about questions from the field.  This one came from a customer testing their new Virtual Desktop Infrustrure (VDI) on Nutanix and had 1 out of 50 users profiles be corrupt. He asked why did this happen and how can I avoid this in the future. Now, I would say that 1 corrupt profile out of 50 is fine during a test, but let understand why it happens. This topic is especially important to understand because directly relates to VDI and your end-user experience in VDI.

Windows User Profiles

What is a Windows User Profile? It not just your desktop 🙂

Let’s do a quick primer…

Windows creates a user profile the first time that a user logs onto a physical computer or VDI session. At subsequent logons, the system loads the user’s profile, and then other system components configure the user’s environment according to the information in the profile.

A user profile consists of the following elements:

  • A registry hive. The registry hive is the file NTuser.dat. The hive is loaded by the system at user logon, and it is mapped to the HKEY_CURRENT_USER registry key. The user’s registry hive maintains the user’s registry-based preferences and configuration.
  • A set of profile folders stored in the file system. User-profile files are stored in the Profiles directory, on a folder per-user basis. The user-profile folder is a container for applications and other system components to populate with sub-folders and per-user data such as documents and configuration files. Windows Explorer uses the user-profile folders extensively for such items as the user’s Desktop, Start menu and Documents folder.

Type of User Profiles

  • Mandatory profiles:
    • Typically one pre-configured profile for many users.
    • Although during a session changes can be made, they are discarded. When the user logs on the next time, the locally cached copy of the mandatory profile is reset (replaced with the network copy).
    • The path to the mandatory profile needs to be assigned to users
    • Useful mainly for kiosk systems.
  • Local profiles:
    • One profile per user per machine.
    • No dependency on the network.
    • Since the profile is available locally, logons are very fast.
    • No configuration is necessary, local profiles are assigned to users automatically.
    • Backing up local profiles is often a challenge because the profiles are distributed across many machines with potentially slow and/or only intermittent network connectivity.
    • Another difficulty is how to transfer local profiles between computers, which becomes necessary when machines are replaced.
    • Useful for users who do not switch computers often or for computers without permanent network connectivity, like laptops. In VDI environments local profiles should not be used since users are directed to an arbitrary (the least loaded) server when they launch a new session.
  • Roaming profiles:
    • One profile per user.
    • The master copy of the profile is stored on a file server. During logon, it is copied to the local machine, which may slow down logons considerably depending on profile size and network speed.
    • During log off, changed files are copied back to the master copy on the file server. Since a user’s registry hive is stored in a single file, this approach creates the “last writer wins” problem.
    • The path to the roaming profile needs to be assigned to users.
    • Useful for most setups where local profiles cannot be used.
  • Temporary User Profiles:
    • A temporary profile is issued each time that an error condition prevents the user’s profile from loading. Temporary profiles are deleted at the end of each session, and changes made by the user to desktop settings and files are lost when the user logs off.

Windows User Profiles

Windows User Profiles – The Reality

Ok, now let me paint a picture….A user calls the help desk to report a strange issue on an application running on their VDI Desktop. What does the help desk technician do? Analyze the root cause of the problem? Probably not. Most likely, the user’s profile will be deleted and the problem will have gone away. Happy ending? Not at all!

Deleting entire user profiles because of malfunctions caused by small data inconsistencies reveals a great deal of helplessness. While the user can work with the faulting application again, the user has lost thousands of personal settings configured both implicitly and explicitly. The help desk technician, on the other hand, has learned nothing from the case, except a brute force way of closing a call. The next time a user rings with a weird problem the technician will be all the more eager to repeat the procedure.

Deleting is cheap. Who is to blame?  Nobody, really. Given the prehistoric user profile design Windows still uses in its latest incarnations, the help desk technician has no other choice but to delete the profile. Trying to get to the root cause is way too difficult and time-consuming a task to perform routinely several times a day. It is so much cheaper to just delete everything and have the user start from scratch.
Why is it like this? Finding a “Needle in a Haystack” is expensive. User profiles are a mess, a chaotic agglomeration of data. Applications can write what they want, where they want, in what way they want into the profile. Among the piles of data junk each Windows user profile stores, there are, however, quite a few hidden gems: the settings a user actually has configured. That is the stuff users care about.

Take your favorite web browser, for example. It comes with hundreds or thousands of factory presets, most of which you could not care about less. But I bet there are a few tweaks in your configuration you would not like to live without. Unfortunately, those settings dear to your heart are buried among all the other default stuff.

Configuration Craziness with some Applications

And it gets worse. Not only are the valuable settings from individual applications intermingled with worthless data, some applications store their configuration all over the place, effectively creating a mix of settings from multiple programs. This makes it virtually impossible to easily identify and extract a single program’s settings. By the way, Microsoft is especially good at this mixing business. Try to identify all storage locations for (Internet) Explorer settings on your own. LOL 😉

Untangling the Knot – How?

The inadequacies of Windows user profiles have led to the development of quite a few profile management products and technologies.  My next post will dive into Best Practices and some of the solutions that help solve this problem.
Finally, at the beginning of the post I mentioned that this series was inspired by a customer in the field. Well, in the end, the problem was a bad registry setting loaded by the NTUSER.DAT, by a third-party application. ;(

Until next time,  Rob.

Leave a Reply

Your email address will not be published. Required fields are marked *