UPHClean v2.0

UPHClean v2.0 is a new version that tries to help with the following scenarios:

Timing fix

In v1.6 there is a timing issue with where the profile unload process stopped trying to unload the user profile hive before UPHClean finished its work. UPHClean finished its release of user profile hive handles but Winlogon had already proceeded without unloading the profile causing it to report a profile hive unload failure.  This is now addressed by having Winlogon waiting until UPHClean has finished all of its work before proceeding.

Open file handles

Apart open registry handles that UPHClean v1.6 deals with open file handles to the user profile can have a bad influence on the profile load and unload process. Open references to profile files prevent the profile load and unload process from reconciling (copying files) from and to the roaming profile location.  This prevents the deletion of the locally cached profile.  Other symptoms of this is if the same user logs in again he or she gets a new profile with a name like username.000, username.001 etc.

UPHClean v2.0 takes care of these by releasing the handle to user profile files when the profile is unloaded.  This is not without risk.  Since UPHClean removes access to files or directories data that was cached by the application for the file is lost.  This could cause the process to fail because it cannot read from the file. During testing this has not been found to be true but there is still a chance that it could happen. This is the reason why the file handle remap feature is disabled by default.

To enable the feature you have to set the following registry key:


Without enabling the remapping feature UPHClean automatically detects sharing violation during the user logoff and retries the failed operation for a small amount of time. You can control the amount of time using the SHARING_VIOLATION_DELAY value. This value is specified in millisecond and has a default value of 1000 millisecond. 

File permissions

In some cases a program might change file permissions or creates a new file/folder within the profile but incorrect permissions.  This may leave the profile load/unload process unable to copy it or delete it. To resolve the issue you have to take ownership first before you can delete the file or folder. UPHClean takes care of those situations.

Real world problems

Here are actual scenarios that UPHClean v2.0 resolves:

  • VMware hgfs.dat
    VMware creates the hgfs.dat file in profile folder for the first user that logs in and keeps it open. When using roaming profiles you get a problem with that. (read VMware FAQ1317 for a solution)
  • SUN Java (JRE)
    In some cases SUN Java creates a folder called hsperfdata<username> with file permissions only set to the user and can not be removed by the system without taking ownership. SUN say’s this is by design (bug id 5042659)
  • Microsoft Internet explorer cookies and favorites
    Favorites and cookie files sometimes excide more than 255 chars and can only be deleted through the command line
  • Also suspects for open file handles causing sharing violation
    SAP SapGui (SapWorkDir), Imprivata SSO, Indexing Software, Virus scanner etc.

It will be supported on Windows 2000 (all versions), Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008.  It will be available for 32 bit and 64 bit platforms.  There are beta bit available for 32 and 64 bit platforms for all Windows 2000, Windows XP, and Windows Server 2003.