Rudy
I've had this same problem with our Windows 2003 SP2 Terminal Server and I finally figured out the issue. It turned out to be the Indexing Service. By using a program called Handle, I was able to figure out that the process cidaemon.exe (Indexing Service) was keeping a lock on the hashfile.dat when the server was trying to delete the roaming profile cache. We did not need the indexing service on our terminal server, so I've disabled it.
Here is how I went about finding this problem (Just in case another process is the culprit). Download the handle (http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx). This CLI problem will display all of the files currently locked by Windows and what process is locking it. There is a lot of information displayed be default. The easiest way I found to do it is to pipe the output to a text file and open it in notepad and then search for the file that you cannot delete (Run command "handle >output.txt" and open output.txt in notepad).
Make sure that you can't delete the file(s) from Explorer first. This will test and see if the file is actually locked. I had a hard time fiquring this out because after X amount of time, the cidaemon.exe process released the file, and I was able to manually delete these, but I was still bothered by what was causing the system not to be able to delete the entire profile when a user logged out.
Hope this helps!
Brantley
I was able to stop the Indexing Service and then delete these files. Does anyone know of a different way to resolve this problem? We need the Indexing Service to run to be able to search for files from the Citrix servers.
At one point I thoughtto help profiles log off, not sure if this will work with a Service you could enter in the name of the executbale in this registry entry though. Does anyone know if this works?
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI]
"LogoffCheckSysModules"="cidaemon.exe"
I can confirm that the reg key method will absolutely work - as for cidaemon.exe, i can't respond :) I've never tried that specific exe. If this is a proveable method - it would be best managed through GPO's, unless you dont mind individual server management of this.