This could go in Servers or in here, but since it can affect people logging-on to a Terminal Server from a Windows XP PC (in my instance), I'll put it here.

We were getting lots of messages to the user and in the Application Event Log:
Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a corrupt local profile. If this problem persists, contact your network administrator.
DETAIL - The process cannot access the file because it is being used by another process.

Rebooting the Terminal Server always causes the problem to go away - but that's a bit drastic, no?

The problem appears to be 'fixed' (I use the word loosely...) by the User Profile Hive Cleanup service (otherwise known as UPHClean) which has been around for ages (John Savill was talking about it in April 2004), but it's the first time I've ever come across it.

Apparently it can often assist also when it takes _a_g_e_s_ to shut down a PC.

I quote from an article: "The idea of this program is to reclaim resources when a task is finished (memory, handles, etc). It accomplishes this by monitoring for users to log off and verifying that unused resources are reclaimed. This approach is superior as it works for any known reason that profiles do not unload and also will keep working to address new unknown issues."

PS A forum search shows that UPHClean was mentioned in November 2004, in a thread starting with <post#=430,543>post 430,543</post#>