如果您遇到“有一个系统修复挂起,需要重新启动才能完成”错误,您可能正在尝试运行系统文件检查器(System File Checker)( SFC )。出现此错误的原因是之前的修复仍未完成。在完成挂起的系统修复之前,您将无法成功运行SFC实用程序。
在大多数情况下,该错误很容易修复,不需要任何重大故障排除。重新启动可以解决问题,但如果没有,您可以尝试其他修复。下面,我们讨论解决此错误的最常见方法。
使用 DISM
DISM(部署映像服务(Deployment Image Servicing)和管理)是(Management)Windows上用于服务系统映像的内置命令行实用程序。它是解决广泛问题的强大工具。
在SFC的上下文中,您可能想尝试两个DISM命令。(DISM)首先(First),您要使用 /restorehealth 参数。如果这不起作用,您可以尝试使用 /revertpendingactions 参数。
- Press Win + R,键入 cmd,然后按Enter启动命令提示符(Command Prompt)。
- 执行以下命令:
DISM.exe /Online /Cleanup-Image /Restorehealth
一旦DISM完成该过程,请尝试运行SFC扫描并查看它是否有效。如果没有,请尝试执行以下命令:
DISM.exe /image:C: /cleanup-image /revertpendingactions
(将 C 替换为安装Windows的驱动器号)
重新启动 Windows 并重新运行 SFC。
如果您无法启动 Windows,则需要从安全模式(Safe Mode)或恢复环境启动(Recovery Environment)命令提示符(Command Prompt)窗口。如果您使用恢复环境,只需导航到Troubleshoot > Advanced Options > Command Prompt。
删除一些文件
首先删除跟踪系统还原过程的文件。如果文件已损坏,则可能会导致“正在等待系统修复”错误,删除它可能只是解决问题。
您需要删除名为pending.xml 的文件。该文件存储在您计算机上的以下路径中:
C:WindowsWinSxSPending.xml
(将 C 替换为安装Windows的驱动器号)
您可以使用命令提示符(Command Prompt)删除此文件,如下所示:
- Press Win + R,键入 cmd,然后按Enter启动命令提示符(Command Prompt)。
- 执行以下命令:
删除 c:windowswinsxspending.xml
删除 XML 文件后,运行以下命令:
证监会 /scannow /offbootdir=c: /offwindir=d:windows
您甚至可以考虑在进行常规 PC 维护时删除整个 WinSxS 文件夹。(deleting the whole WinSxS folder)希望(Hopefully)SFC扫描现在可以正常工作
。
更新驱动程序
如果SFC问题伴随着其他迹象,例如硬件无法正常运行或频繁出现蓝屏死机(Blue Screens of Death),则损坏的驱动程序可能是罪魁祸首。最简单的解决方法是更新驱动程序。
Windows更新(Update)通常会确保您的驱动程序是最新的。如果您已禁用自动更新,以下是更新Windows 10或 11 的方法:
- Press Win + I 启动设置(Settings)应用程序。
- 如果您运行的是Windows 11 ,请从左侧边栏中选择Windows 更新(Windows Update)。
如果您使用的是Windows 10,则需要导航到更新(Update)和Security > Windows Update。但是,Microsoft不再支持Windows 7和 8,因此如果您使用其中一种方法,请跳至以下方法。
- 选择检查更新。
如果Windows找到更新,请安装它们。
您可能特别想注意您的图形驱动程序。如果更新不可用,请继续并重新安装:
- Press Win + R,键入 devmgmt.msc,然后按Enter启动设备管理器(Device Manager)。
- 展开显示(Display)适配器列表,右键单击图形驱动程序,然后选择卸载(Uninstall)。
- 从顶部功能区中选择操作,然后选择(Action)扫描(Scan)硬件更改。
这样做会自动为您的图形设备重新安装最新的驱动程序。
完成更新或重新安装有问题
的驱动程序后,请尝试运行SFC扫描。(SFC)
调整注册表设置
Windows使用“RebootPending”注册表项来密切关注请求重新启动的程序。它本质上是一个需要重新启动的程序队列,当该队列发生更改时,可能会导致运行SFC时出现“系统修复挂起”错误等问题。
解决问题的简单方法是删除“RebootPending”键,如下所示:
- Press Win + R,键入 regedit,然后按Enter启动注册表编辑器(Registry Editor)。
- 将以下内容复制并粘贴到注册表编辑器的导航栏中:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion
- 右键单击(Right-click)CurrentVersion并(CurrentVersion)选择Permissions。
- 从列表中选择您的用户名,选中完全(Full)控制旁边的框,然后选择确定保存并退出窗口。
- 在右侧窗格中查找名为RebootPending的键并删除该键。(RebootPending)当提示确认时,提供它。
重新启动(Reboot)您的 PC 并重试运行SFC命令。
在 BIOS 中更改 SATA 设置
一些用户报告将SATA配置为IDE而不是AHCI可以解决问题。原因似乎是微软(Microsoft)对硬盘总线驱动程序类所做的更改。请注意,最好在修改BIOS设置之前尝试使用其他修复程序。如果你以前的方法没有运气,试试这个方法:
- 首先关闭电脑。
- 再次按下(Press)电源按钮。您需要快速按下BIOS键。棘手的部分是BIOS密钥因制造商而异,但通常是Del、Esc、 F1 、F10或F12。如果没有任何键适合您,
您可能需要查看我们关于如何进入 BIOS的完整指南。(how to enter BIOS)
- 接下来,您需要在BIOS固件中找到SATA选项。同样,根据您的(Again)BIOS固件,该选项可能位于不同的部分。找到该选项的最佳方法是浏览固件并查找诸如SATA、IDE和AHCI之类的词。找到选项后,将SATA设置更改为IDE。
- 保存(Save)更改并退出BIOS,然后启动到您的 PC。
希望(Hopefully)这将解决“SFC /scannow 有一个系统修复未决”的问题。
(Check)使用SFC检查和修复系统文件(Fix System Files)
使用SFC修复(SFC)Windows文件系统错误通常很容易。但是,当SFC本身导致错误而不是修复您已有的错误时,这可能会令人沮丧。好消息是,修复SFC错误非常简单。希望(Hopefully)您能够修复“有系统修复未决”错误。
How to Fix “There Is a System Repair Pending” Error in Windows
If you’ve encountered the “There is a system repair pendіng which requires reboot to complete” error, yoυ’re probably trying to run the System File Сhеcker (SFC). The reаson for this error is that a prevіous repair is still incomplete. Until you comрlete the pending system repair, you won’t be able to run the SFC utility successfully.
In most cases, the error is easy to fix and doesn’t require any major troubleshooting. A reboot can resolve the issue, but if it doesn’t, there are other fixes you can try. Below, we discuss the most common ways to address this error.
Use DISM
DISM (Deployment Image Servicing and Management) is a built-in command-line utility on Windows used to service system images. It’s a powerful tool for solving a broad range of issues.
In the context of SFC, there are two DISM commands you may want to try. First, you want to use the /restorehealth parameter. If that doesn’t work, you might try using the /revertpendingactions parameter.
- Press Win + R, type cmd, and press Enter to launch Command Prompt.
- Execute the following command:
DISM.exe /Online /Cleanup-Image /Restorehealth
Once DISM completes the process, try running a SFC scan and see if it works. If it doesn’t, try executing the following command:
DISM.exe /image:C:\ /cleanup-image /revertpendingactions
(replace C with the drive letter where Windows is installed)
Reboot Windows and rerun SFC.
If you can’t boot into windows, you’ll need to launch a Command Prompt window from the Safe Mode or Recovery Environment. If you use the recovery environment, just navigate to Troubleshoot > Advanced Options > Command Prompt.
Delete a Few Files
Start by deleting files that track the system restore process. If the file has become corrupt, it might be causing the “there is a system repair pending” error, and deleting it might just resolve the issue.
You need to delete the file named pending.xml. The file is stored in the following path on your computer:
C:\Windows\WinSxS\Pending.xml
(replace C with the drive letter where Windows is installed)
You can delete this file using the Command Prompt like so:
- Press Win + R, type cmd, and press Enter to launch Command Prompt.
- Execute the following command:
del c:\windows\winsxs\pending.xml
Once the XML file is deleted, run the following command:
sfc /scannow /offbootdir=c:\ /offwindir=d:\windows
You might even consider deleting the whole WinSxS folder while you’re at it for some regular PC maintenance. Hopefully, the SFC scan will work fine now.
Update Drivers
A corrupt driver might be the culprit if the SFC problem is accompanied by other signs like a piece of hardware not functioning properly or frequent Blue Screens of Death. The easiest fix is to update the drivers.
Windows Update typically ensures your drivers are up to date. If you’ve disabled automatic updates, here is how you can update Windows 10 or 11:
- Press Win + I to launch the Settings app.
- Select Windows Update from the left sidebar if you’re running Windows 11.
If you’re on Windows 10, you’ll need to navigate to Update & Security > Windows Update. However, Microsoft no longer supports Windows 7 and 8, so skip to the following method if you’re using one of these.
- Select Check for updates.
If Windows finds updates, install them.
You might specifically want to pay attention to your graphics driver. If an update isn’t available, go ahead and reinstall it:
- Press Win + R, type devmgmt.msc, and press Enter to launch the Device Manager.
- Expand the list of Display adapters, right-click on the graphics driver, and select Uninstall.
- Select Action from the top ribbon and select Scan for hardware changes.
Doing this will automatically reinstall the latest driver for your graphics device.
Try running the SFC scan once you’ve completed updating or reinstalling problematic drivers.
Tweak Registry Settings
Windows uses a “RebootPending” registry key to keep tabs on programs that request a reboot. It’s essentially a queue of programs that require a reboot, and when something changes that queue, it can lead to problems like the “there is a system repair pending” error while running SFC.
The easy way to fix the problem is to delete the “RebootPending” key like so:
- Press Win + R, type regedit, and press Enter to launch the Registry Editor.
- Copy and paste the following into the Registry Editor’s navigation bar:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
- Right-click on CurrentVersion and select Permissions.
- Select your username from the list, check the box next to Full control, and select OK to save and exit the window.
- Look for a key named RebootPending in the right pane and delete the key. When prompted for confirmation, provide it.
Reboot your PC and retry running the SFC command.
Change SATA Setting in BIOS
Some users report configuring SATA as IDE instead of AHCI resolves the problem. The cause seems to be the changes Microsoft made to hard drive bus driver classes. Note that it’s best to try using the other fixes before tinkering with the BIOS settings. If you haven’t had luck with previous methods, give this method a go:
- Start by shutting down the PC.
- Press the power button again. You’ll need to press the BIOS key quickly. The tricky part is that the BIOS key differs among manufacturers, but it’s typically the Del, Esc, F1, F10, or F12. You might want to check our complete guide on how to enter BIOS if none of the keys worked for you.
- Next, you’ll need to find the SATA option in the BIOS firmware. Again, the option may be in a different section based on your BIOS firmware. The best way to find the option is just to explore the firmware and look for words like SATA, IDE, and AHCI. Once you find the option, change the SATA setting to IDE.
- Save changes and exit the BIOS, and boot into your PC.
Hopefully, that will fix the “SFC /scannow there is a system repair pending” issue.
Check and Fix System Files with SFC
It’s typically easy to fix Windows file system errors with SFC. But it can be frustrating when SFC itself results in an error instead of fixing the one you already have. The good thing is, fixing the SFC error is pretty straightforward. Hopefully, you were able to fix the “There is a system repair pending” error.