Windows 7 User Profile Service Error
Posted on 2010-11-09
I enabled "Delete User Profiles Older than X number of days" on four test machines. These machines are running Windows 7 Enterprise.
At first, no old profiles were being deleted. I disabled Windows Defender (as a test) because it was scanning the NTuser.dat file in each local profile. This would change the modify date on the profile which prevented the User Profile Service from deleting it.
Now, the user profile service is cleaning up old profiles but it always leaves the old profile behind with a few empty folders under AppData. Event viewer shows error messages for each profile. They read.
Event 1533: User Profile Service
Windows cannot delete the profile directory C:\Users\USERNAME\. This error may be caused by files in this directory being used by another program.
DETAIL - The directory is not empty.