Home > Uncategorized > SOLVED: SFC says “There is a system repair pending…”

SOLVED: SFC says “There is a system repair pending…”

Frequently when I’ve removed a virus, I want or need to run the SFC /scannow repair program. Quite often it seems, in Windows 7 and Vista, the command can’t run an returns an error message of:

“There is a system repair pending which requires reboot to complete. Restart Windows and run sfc again.”

Try as one might and regardless of whether you can boot into Safe Mode or are using the Recovery Console, this error just won’t go away. However, I have found a command finally that overcomes this problem. On a machine that I was working on today, from the Recovery Console command prompt I entered:

dism.exe /image:C:\ /cleanup-image /revertpendingactions

After that, I rebooted the machine into Safe Mode (this particular computer would boot to Safe Mode but is BSODing when booted to normal mode). In Safe Mode, I opened an elevated command prompted and issued the SFC /scannow command and it now runs.

Categories: Uncategorized Tags: ,
  1. December 6th, 2012 at 16:18 | #1

    This info has helped me in the past. Tonight I was stuck when it didn’t work. After 2 hours of trial and error and many sites later, I came across the following info. It worked. Wanted to share it here to provide an additional possible solution for the people finding your site.

    Einstein stated the definition of insanity was doing the same thing over and over expecting a different result. He obviously never worked on a PC. :)

    Next, we will perform a sfc /scannow using the offline settings for the boot directory and windows directory. If you use the incorrect options, two errors are common,

    “Windows Resource Protection could not start the Repair service.”

    “There is a system repair pending which requires reboot to complete. Restart Windows and run sfc again.”

    The first error indicates an invalid boot or system partition path. The second indicates that incorrect arguments wre given, or there is a file that needs to be removed or renamed in the \Windows\winsxs\pending.xml path. For this installation, this is D:\Windows\winsxs\pending.xml.

    For this particular system, this is the correct command to run based on the output of diskpart above

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

    • December 6th, 2012 at 16:49 | #2

      Thanks for your input on this. This seems like a weird special case though isn’t it? I’m trying to understand how the Windows directory is on a D: drive but the boot directory is on C:. Where is the target broken Windows folder then, on D:? And what is on C: in this case?

  2. j4gg3d
    December 19th, 2012 at 19:05 | #3

    I’m in love with both of you. Countless useless and frustrating, unhelpful blogs out there, and I come upon these two little gems of info.

    Thank you both.
    BTW client’s laptop in this case (Dell latitude E5510) came preinstalled with boot C: and OS D:, no idea why they (dell) shipped it out like that.

    • December 19th, 2012 at 19:45 | #4

      I was trying to fix a problem the other day with a machine that would not take SP1 on a brand new installation of Windows 7. Searching for an answer, I went to an item on an otherwise pretty good Windows 7 forum, that was titled, “Solved: Can’t install SP1 on Windows 7″. The “solution” was to reinstall Windows 7. I try to keep this blog fairly technical so as to attract smart people (like yourself :-) with smart solutions.

  3. Smile
    February 26th, 2013 at 05:06 | #5

    Thank you very much! You saved my day!

  4. alan
    April 17th, 2013 at 13:53 | #6

    Thanks great and helpful info!!!!

  5. Royale
    April 30th, 2013 at 18:45 | #7

    Long hours of looking around and attempting fixes, thanks a lot for the information.

    the revert changes worked for me. ran this at recovery command console:

    dism.exe /image:C:\ /cleanup-image /revertpendingactions

    followed by this:

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

  6. Samir
    June 16th, 2013 at 16:47 | #8

    Does this have anything to do with C:\windows\winsxs\cleanup.xml? And do you have a solution for Windows Vista? Because dism.exe (Deployment Image Servicing and Management) is not available in Windows Vista.

  7. Sarj09
    August 8th, 2013 at 10:54 | #9

    Thanks you guys saved my life with a clients computer that I could not get too boot. Followed your instructions to the letter and you got me out of a sticky spot. You answered my prayers.
    Thank You! Thank You! Thank You!

    • August 8th, 2013 at 10:57 | #10

      …and we do love being the answer to prayers. I’m glad this helped.

  8. dan360
    November 14th, 2013 at 02:39 | #11

    Hi, i’m a noobie & i tried dism.exe fix above but get, ‘ dism.exe is not recognised as an internal or external co.mand, operable program or batch file. I’m using Vista Business (x86) under command as admi istrator using system rescue disc. Please can anyone help? Dan

    • November 14th, 2013 at 09:56 | #12

      This may not work on Vista. I think I’ve tried it and got the same result as you. You could try searching for dism.exe on the boot drive and/or CD or you could try using a Windows 7 disc to boot from but I have my doubts about whether that would work.

  9. April 3rd, 2014 at 20:10 | #13

    This did not work for me, error message says it cannot find the image file. Any other suggestions?

  1. No trackbacks yet.