How to Fix ‘There is a system repair pending’ Error in CMD

A pending system repair is a notification which means that no system level actions can be performed until the system repair in queue is processed. This is usually fixed after a reboot.

This error appears on Windows PC after an SFC scan has been launched. SFC stands for System File Checker and it’s a tool used to find and fix errors concerning system file. However, the problem occurs when this error message comes up after you try to run the scan.

The system checks for pending system repair files when the SFC is initiated and these files have remained there from previous system repairs. If you have indeed launched a system repair process, restart your computer and check to see if the problem is gone. Otherwise, follow the method below.

Solution 1: Delete the Following Files in Command Prompt

These files keep track of pending system repair processes running on your computer and the file may have gone corrupt. Deleting will reset the pending processes and the system won’t be fooled that there is a system repair process pending. Follow the steps below in order to delete these files and run SFC properly.

  1. If you are a Windows 10 user, you can easily locate Command Prompt simply by clicking the Start menu button or the Search button next to it and type in “cmd” or “Command Prompt”. Right-click on the first result and choose the Run as administrator option.

  1. If you are running a version of Windows older than Windows 10, the Start menu search might or might not work properly but you can still navigate to C >> Windows >> System32, right-click on the “cmd.exe” entry and choose Run as administrator.
  2. Type in or copy the two following commands in order to delete these files. Make sure you try this out varying both the letter ‘d’ and ‘c’ in the drive letter in the first command.

del d:\windows\winsxs\pending.xml
del x:\windows\winsxs\pending.xml

  1. After you see the “operation completed successfully” message in Command Prompt, make sure you complete the SFC scan using this somewhat modified version with instructions.

sfc /SCANNOW /OFFBOOTDIR=c:\ /OFFWINDIR=d:\Windows

  1. Check to see if SFC now completes successfully.

Note: In some cases, Command Prompt will throw an error after you try to delete the pending files. This means you will have to take ownership of the WinSxS folder in order to proceed. It shouldn’t be too difficult!

  1. Navigate to the location C >> Windows and locate the WinSxS folder.
  2. If you are unable to see the Windows folder, you may need to turn on the option which enables you to view hidden files and folders. Click on the “View” tab on File Explorer’s menu and click on the “Hidden items” checkbox in the Show/hide section. File Explorer will show the hidden files and will remember this option until you change it again.

  1. Right-click the folder, click Properties, and then click the Security tab. Click the Advanced button. The “Advanced Security Settings” window will appear. Here you need to change the Owner of the key.
  2. Click the Change link next to the “Owner:” label The Select User or Group window will appear.

  1. Select the user account via the Advanced button or just type your user account in the area which says ‘Enter the object name to select’ and click OK. Add your user account.
  2. Optionally, to change the owner of all subfolders and files inside the folder, select the check box “Replace owner on subcontainers and objects” in the “Advanced Security Settings” window. Click OK to change the ownership. Try deleting it afterwards.

Solution 2: Change a BIOS Settings

A certain group of users claim that they have been able to solve this problem simply by changing the SATA operation settings from AHCI or something else to IDE mode. It appears that the cause of the issues was some problems after Microsoft team changes certain things on the hard driver bus management driver classes. Try this method out below!

  1. Turn off your computer by going to the Start Menu >> Power Button >> Shut down.
  2. Turn your PC on again and try to enter BIOS settings by pressing the BIOS key while the system starts. The BIOS key is typically displayed on the boot screen, saying “Press ___ to enter Setup.” There are other ways it may be displayed as well. Common BIOS keys are F1, F2, Del, Esc and F10 so make sure you click it fast enough.

Rezultat slika za press to run setup

  1. The SATA option which you will need to change is located under various tabs on BIOS firmware tools made by different manufacturers and these is no general rule to where the setting should be located. It’s usually located under Onboard devices entry, Integrated Peripherals, or even simply under the Advanced tab. No matter where it is, the name of the option is SATA operation.

  1. Once you locate the correct settings, change it from AHCI, RAID, ATA, to IDE is the most reasonable option for the process of system repairs and you can easily revert your changes in the same spot.
  2. Navigate to the Exit section and choose to Exit Saving Changes. This will proceed with the boot. Make sure you try to run the update again.
    Note: If the setting was IDE to begin with, try changing it to something else no matter what as there are cases where any change produced great results!

Solution 3: Update Your Drivers (Graphics Card Especially)

If the SFC error is followed by BSODs (Blue Screens of Death), it’s definitely a sign that one of your old drivers is causing these issues and you should update it as soon as possible. Your best bet is to update all drivers as it’s always important to have the latest ones as it will possibly prevent future problems from occurring.

  1. Select the Start button, type Device Manager, and select it from the list of results. If you are using an older version of Windows, use the Windows Key + R key combination, type in “devmgmt.msc” and click OK.

  1. Expand one of the categories to find the name of your device, then right-click (or tap and hold) it, and select Update Driver. For graphics cards, expand the Display adapters category, right click your graphics card and select Update Driver.

  1. Select Search automatically for updated driver software.
  2. If Windows doesn’t find a new driver, you can try looking for one on the device manufacturer’s website and follow their instructions.

Note: If you are using Windows 10, latest drivers are often installed alongside other Windows updates so make sure you keep your computer up to date. Windows Update is run automatically on Windows 10 but you can check by following the instructions below for a new update.

  1. Use the Windows Key + I key combination in order to open Settings on your Windows PC. Alternatively, you can search for “Settings” by using the search bar located at the taskbar.
  2. Locate and open the “Update & security” section in the Settings app.
  3. Stay in the Windows Update tab and click on the Check for updates button under the Update status in order to check whether there is a new version of Windows available.

  1. If there is one, Windows should proceed with the download process automatically.

Solution 4: Fix the Problem in Recovery Environment

This step is one of the most advanced ones and it involves some serious troubleshooting. However, the commands we are going to use can only be launched from the recovery environment and this environment can be accessed easily on Windows 10. These commands are harmless and they can solve the problem so make sure you follow the steps below carefully.

  1. On the login screen, click on the Power icon and hold the Shift key while clicking restart. This is a great shortcut to accessing the Recovery menu without having to input your recovery DVD.
  2. Instead or restarting, a blue screen will appear with several options. Choose Troubleshoot >> Advanced Options >> Command Prompt and for your computer to open the tool.

  1. Type in the following commands one by one and wait for them to finish their process. One of them should fix your problem but make sure you keep the order exactly the same.

bcdboot C:\Windows
bootrec /FixMBR
bootrec /FixBoot

  1. Boot into your computer normally and check to see if the problem is solved with SFC.

Solution 5: A Registry Tweak

Here is a registry key which keeps track of which programs are in the queue requesting reboot and deleting it results in this queue being lost and it will prevent Windows from thinking there is a process requesting reboot when such a process doesn’t exist.

  1. Since you are going to edit the registry, we recommend you check out this article we have prepared in order to safely backup your registry to prevent further problems. Still, nothing wrong will occur if you follow the instructions carefully.
  2. Open the Registry Editor interface by typing “regedit” in either the search bar or the Run dialog box. Navigate to the following key in Registry Editor by navigating in the left pane:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

  1. Under the CurrentVersion key, you should be able to see a key named RebootPending so make sure you right-click on it and click on Permissions.
  2. Under the Group or user names section, try to locate your username on the list. If you fail to do so, click on Add >> Advanced >> Find Now. You should be able to see your user account under the Search results section so select it and click OK twice until you back in the Permissions folder.

  1. Select you account in the Group or user names section and check the Full Control checkbox under Permissions for… and apply the changes you have made.
  2. After that, you can right-click the RebootPending key and click on Delete. Confirm the dialog box which will appear and restart your computer to apply the changes. Check to see if the problem still appears.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.