After updating windows today (win10 anniversary update) a file was created in my user folder called "NTUSER.dat" which seems to be open by the system every time i try to delete it. Any ideas?
34 Answers
NTUSER.DAT is the user registry hive which should not be deleted. Moreover it can't be deleted when you're logged on to your account.
NTUSER.DAT contains all the registry settings for your account. This file gets loaded into HK_Current_user when you log in, hence why it is locked by the system when you are logged in.
This contains settings such as your printers, Document history for office and holds operating system information for your account. This file should not be deleted. If you do decide to delete the file, your user profile may become corrupt and you will be unable to log back in properly.
I had this too. To get rid go to file explorer, select view - options - change folder and search options. Then select view - don't show hidden files and folders. I had selected show hidden files and folders when trying to delete a recycle bin file from an external hdd and that is what caused it to show the user dat.
Remember, don't delete your OWN NTUSER.DAT! This is for removing the file for a user who has been deleted/deactivated/etc. and for whom you want to delete the profile manually.
First, search in the registry for the profile entry:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\
In data for one of the keys will be the user that you removed. Delete the entire key.
Second, reboot. Because the registry entry for the profile no longer exists, SYSTEM will no longer open the NTUSER.DAT file.
Third, delete the user folder, the file, or whatever you need to in there. Assuming you are an administrator on the machine you should be able to do it.