当您在Windows 10(Windows 10)上创建新的用户配置文件时,操作系统需要在某个地方保存您的设置。虽然您可能认为此信息保存在Windows 注册表(Windows Registry)中,但情况并非完全如此。虽然某些信息存储在注册表(Registry)中,但您的用户配置文件设置通常保存到NTUSER.DAT。
NTUSER.DAT文件是必不可少的——没有它,您对帐户所做的任何个性化设置都不会保存。如果您不小心删除了NTUSER.DAT文件,或者该文件已损坏,您将无法在不解决问题的情况下登录。如果您在使用NTUSER.DAT时遇到问题,以下是您需要了解的内容。

什么是 Windows 10 中的 NTUSER.DAT 文件?(What Is the NTUSER.DAT File in Windows 10?)
当您在Windows 10上更改您的帐户时,必须将更改保存在某处。这没有一个明显的位置,因为该位置通常是隐藏的,但是您要查找的文件位于您的用户配置文件文件夹(C:Users)中。
这是NTUSER.DAT文件,它用作用户设置的永久库。该文件可以追溯到Windows NT操作系统的最早时期,于 1993 年首次推出。当您登录到用户配置文件时,更改会本地保存到Windows 注册表(Windows Registry)(在HKEY_CURRENT_USER中)。

当您注销、重新启动或关闭 PC 时,此信息将保存回NTUSER.DAT文件以进行安全保存。重新登录到您的帐户后,NTUSER.DAT文件(以及其中包含的信息)将重新加载到注册表中。
NTUSER.DAT文件确保您对帐户所做的任何个性化设置在您登录时始终可用,并将您的设置与其他用户配置文件分开。如果文件损坏,或者您手动删除文件,您的用户设置将会丢失。
为什么不应该删除 NTUSER.DAT 文件(Why You Shouldn’t Delete the NTUSER.DAT File)
大多数用户甚至不知道NTUSER.DAT文件的存在,更不用说它的重要性了。如果您前往 C:Users 文件夹中的用户配置文件文件夹,您通常不会在那里看到该文件。这是因为NTUSER.DAT等重要文件通常被隐藏以避免意外删除。
即使您在 PC 上显示隐藏文件(show hidden files),也不建议删除NTUSER.DAT文件。(NTUSER.DAT)删除它将删除您的所有用户设置,并在此过程中破坏您的用户配置文件。下次登录时,Windows会提醒您无法登录。

发生这种情况时,Windows会生成一个临时用户配置文件(在 C:UsersTEMP 文件夹中),而不是让您登录自己的帐户。您自己的用户配置文件的NTUSER.DAT文件不会重新生成,因此您将无法保存任何设置。在某些情况下,Windows可能根本不允许您登录。
如果您确实删除了NTUSER.DAT文件,则需要先创建一个新帐户,然后将该用户配置文件的(NTUSER.DAT)NTUSER.DAT文件复制到您的旧帐户配置文件文件夹,从而将其替换为真正的替代品。
如何在 Windows 10 中删除 NTUSER.DAT(How to Remove NTUSER.DAT in Windows 10)
正如我们刚刚解释的那样,删除NTUSER.DAT文件对于大多数用户来说确实是不可取的,因为它可能会将您锁定在您的用户帐户之外。但是,在有限的用例中,删除文件可以解决您的用户配置文件的某些问题。
例如,如果文件已经以某种方式损坏,删除NTUSER.DAT并替换它可以解决问题。您需要三个用户帐户才能完成这项工作:一个损坏的帐户,一个具有管理员访问权限的帐户,您可以从中进行更改,一个帐户具有新的NTUSER.DAT文件以供复制。
- 首先,使用管理员访问权限登录您的第二个用户帐户(但不是您要从中复制NTUSER.DAT的帐户)。登录后,打开文件资源管理器(File Explorer)并使用地址栏或导航选项打开 C:Users 文件夹。

- 在 C:Users 文件夹中,打开包含您要删除的NTUSER.DAT文件的帐户的用户文件夹。(NTUSER.DAT)如果您看不到列出的NTUSER.DAT文件,则需要启用对隐藏文件的访问。使用功能区栏选择视图(View )>隐藏文件来执行此操作。( Hidden Files)

- 启用隐藏文件后,您应该会看到列出的NTUSER.DAT文件。(NTUSER.DAT)如果您只想暂时删除文件(使其停止工作),请右键单击它并选择Rename。将文件重命名为明显的名称,例如NTUSER.DAT.OLD。如果您遇到任何问题,这将允许您稍后恢复文件。

- 但是,如果您想完全删除该文件,请右键单击NTUSER.DAT文件并选择“删除(Delete)”选项。如果需要,选择任何屏幕选项以确认文件删除。

- 根据文件的大小,您接下来可能需要清空回收站。为此,请双击桌面上的回收站(Recycle Bin)图标。

- 在回收站(Recycle Bin)文件夹中,右键单击NTUSER.DAT文件并选择删除(Delete)选项。或者,选择功能区栏中的清空回收站(Empty Recycle Bin )按钮。

删除或重命名NTUSER.DAT(NTUSER.DAT)文件后,该帐户的用户配置文件设置现在丢失。您需要按照以下步骤重新引入新的NTUSER.DAT文件,或者在 Windows 设置中完全删除用户帐户。(delete the user account)
恢复损坏的用户配置文件(Recovering a Corrupted User Profile)
如果您删除了NTUSER.DAT文件,您可能无法再次登录您的帐户。如果您可以登录,Windows可能会生成一个临时用户配置文件,这意味着当您退出或重新启动时,您的配置文件的任何设置或更改都不会保存。
如果您的用户配置文件已损坏,您可以将NTUSER.DAT文件从另一个用户配置文件复制到损坏帐户的 C:Users 文件夹中。最好从全新的用户帐户复制NTUSER.DAT,因为这将尽可能接近默认配置文件。
- 假设您准备好从中复制新的用户配置文件,请登录管理员帐户(但不是您要从中复制NTUSER.DAT的帐户)。使用文件资源管理器,使用未损坏的(File Explorer)NTUSER.DAT文件打开另一个帐户的 C:Users 文件夹,然后通过选择查看(View )>隐藏文件( Hidden Files)启用隐藏文件查看。

- 启用隐藏文件后,右键单击NTUSER.DAT文件并选择Copy。使用左侧的地址栏或导航菜单,导航到包含损坏或删除的NTUSER.DAT文件的用户配置文件的 C:Users 文件夹。

- 移动到带有损坏或删除的NTUSER.DAT文件的用户配置文件后,右键单击空白区域并选择粘贴(Paste)。这会将第二个帐户的NTUSER.DAT文件的副本粘贴到原始帐户中。

- 使用复制的NTUSER.DAT文件,通过右键单击开始(Start)菜单并选择关闭或注销(Shut down or sign out )>注销来注销( Sign out)现有帐户。

注销后,登录到您恢复的用户帐户。Windows将从新的NTUSER.DAT文件中读取,此时应允许您登录。如果成功,您可以更改您的个性化设置(包括您的背景)以尽可能恢复您的原始个人资料。
维护 Windows 10(Maintaining Windows 10)
不建议大多数用户删除NTUSER.DAT文件,但它可以帮助重置以某种方式损坏的用户配置文件。损坏的用户配置文件表明您的 PC 存在其他问题,因此可能值得运行一些常规维护任务,包括检查损坏的系统文件(checking for corrupt system files)。
定期维护很重要,因此请记住扫描恶意软件(scan for malware)并定期备份您的硬盘。(back up your hard drive)如果您的 PC 无法正常工作,可能是时候考虑完全重置 Windows 10(resetting Windows 10 entirely)或升级您的 PC(upgrading your PC),用更新的组件替换苦苦挣扎的硬件。
What Is ntuser.dat in Windows 10 and Can It Be Removed?
Whеn you create a new user profile on Windows 10, the operating system nеeds somewhere to save your settings. While you might think this information is saved in the Windows Registry, that isn’t entirely the case. While some information is stored in the Registry, your user profile settings are usually saved to NTUSER.DAT.
The NTUSER.DAT file is essential – without it, any personalization you’ve made to your account won’t get saved. If you delete the NTUSER.DAT file by accident, or if the file becomes corrupted, you won’t be able to sign in without resolving the issue. If you’re having trouble with NTUSER.DAT, here’s what you’ll need to know.

What Is the NTUSER.DAT File in Windows 10?
When you make changes to your account on Windows 10, the changes have to be saved somewhere. There isn’t an obvious place for this, because the location is usually hidden from view, but the file you’re looking for sits in your user profile folder (C:\Users).
This is the NTUSER.DAT file, and it serves as a permanent library of your user settings. This file dates to the earliest days of the Windows NT operating system, first launched in 1993. When you’re signed in to a user profile, changes are saved locally to the Windows Registry (in HKEY_CURRENT_USER).

When you sign out, restart, or shutdown your PC, this information is saved back to the NTUSER.DAT file for safe keeping. After signing back into your account, the NTUSER.DAT file (and the information held within) is loaded back into the registry.
The NTUSER.DAT file ensures that any personalization you make to your account is always made available when you sign in, as well as separating your settings from other user profiles. If it becomes corrupted, or if you delete the file manually, your user settings will be lost.
Why You Shouldn’t Delete the NTUSER.DAT File
Most users won’t even know that the NTUSER.DAT file exists, let alone the importance of it. If you head to your user profile folder in the C:\Users folder, you won’t usually see the file there. That’s because important files like NTUSER.DAT are usually hidden to avoid accidental deletion.
Even if you show hidden files on your PC, deleting the NTUSER.DAT file isn’t advisable. Removing it will remove all your user settings, corrupting your user profile in the process. The next time you sign in, Windows will alert you that sign in isn’t possible.

When this happens, Windows generates a temporary user profile (in the C:\Users\TEMP\ folder), rather than signing you in to your own account. The NTUSER.DAT file for your own user profile isn’t regenerated, so you won’t be able to save any settings. In some cases, Windows may not allow you to sign in at all.
If you do remove a NTUSER.DAT file, you’ll need to replace it with a genuine alternative by creating a new account first, then copying that user profile’s NTUSER.DAT file over to your old account profile folder.
How to Remove NTUSER.DAT in Windows 10
As we’ve just explained, removing the NTUSER.DAT file really isn’t advisable for most users, as it could lock you out of your user account. However, there is a limited use case where deleting the file can resolve certain issues with your user profile.
For instance, if the file is already corrupted in some way, deleting NTUSER.DAT and replacing it can resolve the issue. You’ll need three user accounts to make this work: one corrupted account, one account with administrator access you can make changes from, and one account with a fresh NTUSER.DAT file to copy from.
- To start, sign in to your second user account with administrator access (but not the account you’re copying NTUSER.DAT from). Once you’ve signed in, open File Explorer and use the address bar or navigation options to open the C:\Users folder.

- In the C:\Users folder, open the user folder for the account with the NTUSER.DAT file you wish to delete. If you can’t see the NTUSER.DAT file listed, you’ll need to enable access to hidden files. Select View > Hidden Files using the ribbon bar to do this.

- With hidden files enabled, you should see the NTUSER.DAT file listed. If you want to only temporarily remove the file (stopping it from working), right-click it and select Rename. Rename the file something obvious, such as NTUSER.DAT.OLD. This will allow you to recover the file later, if you face any issues.

- If you want to delete the file completely, however, right-click the NTUSER.DAT file and select the Delete option. Select any on-screen options to confirm the file deletion, if required.

- Depending on the size of the file, you may need to empty your recycle bin next. To do this, double-click the Recycle Bin icon on the desktop.

- In the Recycle Bin folder, right-click the NTUSER.DAT file and select the Delete option. Alternatively, select the Empty Recycle Bin button in the ribbon bar.

With the NTUSER.DAT file deleted or renamed, the user profile settings for that account are now missing. You’ll need to reintroduce a fresh NTUSER.DAT file by following the steps below or delete the user account entirely in Windows Settings.
Recovering a Corrupted User Profile
If you’ve deleted an NTUSER.DAT file, it’s likely that you won’t be able to sign in again to your account. If you can sign in, Windows may generate a temporary user profile, meaning that any settings or changes to your profile aren’t saved when you sign out or restart.
If your user profile is corrupted, you can copy the NTUSER.DAT file from another user profile to the C:\Users folder of the corrupted account. It’s best to copy NTUSER.DAT from an entirely fresh user account, as this will be as close to a default profile as possible.
- Assuming you have a fresh user profile ready to copy from, sign in to an administrator account (but not the account you’re copying NTUSER.DAT from). Using File Explorer, open the C:\Users folder for another account with a non-corrupted NTUSER.DAT file, then enable hidden file view by select View > Hidden Files.

- With hidden files enabled, right-click the NTUSER.DAT file and select Copy. Using the address bar or navigation menu on the left, navigate to the C:\Users folder for the user profile with the corrupted or deleted NTUSER.DAT file.

- Once you’ve moved to the user profile with the corrupted or deleted NTUSER.DAT file, right-click the white space and select Paste. This will paste a copy of the second account’s NTUSER.DAT file in the original account.

- With the copied NTUSER.DAT file in place, sign out of your existing account by right-clicking the Start menu and selecting Shut down or sign out > Sign out.

After logging out, sign in to your restored user account. Windows will read from the new NTUSER.DAT file and should allow you to sign in at this point. If successful, you can make changes to your personalization settings (including your background) to restore your original profile as much as possible.
Maintaining Windows 10
Removing the NTUSER.DAT file isn’t recommended for most users, but it can help to reset a user profile that’s become corrupted in some way. A corrupt user profile points to other issues with your PC, so it might be worth running some regular maintenance tasks, including checking for corrupt system files.
Regular maintenance is important, so remember to scan for malware and back up your hard drive regularly. If your PC isn’t working, it might be time to consider resetting Windows 10 entirely or upgrading your PC, replacing struggling hardware with more up-to-date components.