每个用户配置文件中都隐藏了一个名为NTUSER.DAT的文件。 该文件包含每个用户的设置和首选项,因此您不应删除它,也可能不应该对其进行编辑。 Windows会自动为您加载,更改和保存文件。
NTUSER.DAT包含您的用户配置文件设置(NTUSER.DAT Contains Your User Profile Settings)
Every time you make a change to the look and behavior of Windows and installed programs, whether that’s your desktop background, monitor resolution, or even which printer is the default, Windows needs to remember your preferences the next time it loads.
每次更改Windows和已安装程序的外观和行为时,无论是您的桌面背景,显示器分辨率,还是默认的打印机,Windows下次加载时都需要记住您的首选项。
Windows accomplishes this by first storing that information tothe Registryin the HKEY_CURRENT_USER hive. Then when you sign out or shut down, Windows saves that information to the NTUSER.DAT file. The next time you sign in, Windows will load NTUSER.DAT to memory, and all your preferences load to the Registry again. This process lets you personal settings unique to your user profile, like your chosen desktop background.
Windows通过首先将该信息存储到HKEY_CURRENT_USER配置单元中的注册表来实现此目的。 然后,当您注销或关闭时,Windows将该信息保存到NTUSER.DAT文件。 下次登录时,Windows将NTUSER.DAT加载到内存中,并且所有首选项都再次加载到注册表中。 此过程使您可以针对用户配置文件进行个性化设置,例如选择的桌面背景。
The name NTUSER.DAT is a holdover from Windows NT, first introduced with Windows 3.1. Microsoft uses the DAT extension with any file that contains data.
名称NTUSER.DAT是Windows NT的保留,最早是Windows 3.1引入的。 Microsoft将DAT扩展名与任何包含数据的文件一起使用。
每个用户都有一个NTUSER.DAT文件(Every User Has an NTUSER.DAT File)
Windows didn’t always have full support for user profiles. In early versions when you started Windows, every user of the computer saw the same desktop, files, and programs. Now Windows better supports multiple users on the same machine, and it does this by placing an NTUSER.DAT file in every user’s profile. You can get there by opening File Explorer and either browsing to:
Windows并不总是完全支持用户配置文件。 在启动Windows的早期版本中,计算机的每个用户都可以看到相同的桌面,文件和程序。 现在Windows可以更好地在同一台计算机上支持多个用户,并且可以通过在每个用户的配置文件中放置一个NTUSER.DAT文件来做到这一点。 您可以打开文件资源管理器,然后浏览至:
C:\Users\*YourUserName*
C:\ Users \ *您的用户名*
or by typing:
或输入:
%userprofile%
into File Explorer’s address bar, and then hitting enter.
进入文件资源管理器的地址栏,然后按Enter。
If you don’t see NTUSER.DAT yet, don’t worry. Microsoft doesn’t intend for you to edit or delete this file, so they hide it. You can turn on theShow Hidden Filesoption to make the file visible.
如果您还没有看到NTUSER.DAT,请不要担心。 Microsoft不想让您编辑或删除此文件,因此它们将其隐藏。 您可以打开“显示隐藏的文件”选项以使文件可见。
You’ll probably notice that in addition to an NTUSER.DAT file, there are also one or more ntuser.dat.LOG files. Every time you make a change, Windows saves your new preferences to the NTUSER.DAT file. But first, it makes a copy and renames it to ntuser.dat.LOG (plus an incremented number) to back up your previous settings. Even Microsoft knows you should alwaysback up your settings and files.
您可能会注意到,除了一个NTUSER.DAT文件之外,还有一个或多个ntuser.dat.LOG文件。 每次进行更改时,Windows都会将新的首选项保存到NTUSER.DAT文件中。 但是首先,它会制作一个副本并将其重命名为ntuser.dat.LOG(加上递增的数字)以备份以前的设置。 即使Microsoft也知道您应该始终备份设置和文件。
不要删除NTUSER.DAT文件(Don’t Delete the NTUSER.DAT file)
You shouldn’t ever delete your NTUSER.DAT file. Because Windows depends on it to load your settings and preferences, removing it would corrupt your user profile. When you next log in, you’ll see a prompt that Windows can’t sign into your account.
您永远不应删除NTUSER.DAT文件。 因为Windows依靠它来加载设置和首选项,所以删除它会破坏您的用户配置文件。 下次登录时,系统会提示您Windows无法登录您的帐户。
Despite the suggestion that signing out and then back in may fix the problem, you’ll see the same message again. If you try to create a plain NTUSER.DAT file to replace the missing instance, you’ll experience a loop during the first-time setup dialog and Windows will never finish logging in.
尽管有人建议先注销然后再登录可能会解决问题,但您将再次看到相同的消息。 如果您尝试创建一个普通的NTUSER.DAT文件来替换丢失的实例,则在首次安装对话框时会遇到循环,并且Windows将永远无法完成登录。
The NTUSER.DAT file isn’t usually a large file, ranging between 3 megabytes on one of our new computers to 17 megabytes on a PC we’ve been using for a few years. Deleting it won’t regain much space typically, but the results can be disastrous. If a user profile isn’t needed, it’s best toremove the user accountthrough Windows.
NTUSER.DAT文件通常不是大文件,介于一台新计算机上的3兆字节到我们已经使用了几年的PC上的17兆字节之间。 删除它通常不会重新占用太多空间,但是结果可能是灾难性的。 如果不需要用户配置文件,最好通过Windows删除用户帐户。
You probably shouldn’t edit it either. Some administrators might do this to make quick changes to many users, but if you aren’t careful, you can cause problems that are hard to fix.
您可能也不应该对其进行编辑。 某些管理员可能这样做是为了对许多用户进行快速更改,但是如果您不小心,可能会导致难以解决的问题。
The better thing to do isuse regeditto make changes to the registry. Working in the registry is also something you should do with caution, but there’s a good chance you can find a guide that will walk you through the necessary steps. After you have edited the registry when you next log off or shut down your new settings will be saved to the NTUSER.DAT file.
更好的方法是使用regedit对注册表进行更改。 在注册表中进行操作也应谨慎行事,但是很有可能您会找到一份指南,该指南将指导您完成必要的步骤。 下一次注销或关闭注册表后,编辑注册表后,新设置将保存到NTUSER.DAT文件中。