none
SFC problem - "Windows Resource Protection could not start the repair service"

    Question

  • We are trying to attempt to fix a Windows 2008 start up problem. We boot the machine from a Windows 2008 CD and go to the repair tool - command prompt.

    When we do the command sfc /scannow, we are getting

    "Windows Resource Protection could not start the repair service"

    We did some researches there someone suggested the trustedinstaller is not running so we tried to do a net start trustedinstaller.

    But We are getting

    "The windows modulers instaler service is starting
    The windows modulers instaler service is starting could not be started

    A system error has occured
    System error 1067 has occured
    The process terminated unexpectedly. "

    Anyone can give us an idea to see why we can not run the sfc the first place. Thanks

    Thursday, November 05, 2009 12:45 AM

Answers

  • Hello Chun-Chu,
    Can you try to boot to the install DVD ( or a copy of WinPE if you have one available) and choose the repair option in the lower left hand corner?
    If so can you try to run sfc with the offline options to see if the system will repair or identify corrupted files?
    Thanks, Darrell Gorter This posting is provided "AS IS" with no warranties, and confers no rights
    • Marked as answer by Chun-Chu Friday, November 06, 2009 11:43 PM
    Thursday, November 05, 2009 9:11 PM

All replies

  • Hi,

     

    Please refer to the following article to troubleshoot this issue:

     

    http://www.winhelponline.com/blog/fix-for-error-windows-resource-protection-could-not-start-the-repair-service-when-running-sfc-in-vista/

     

    Hope it helps.

     

    Tim Quan - MSFT

    Thursday, November 05, 2009 3:48 AM
    Moderator
  • Thanks. Tim. We did find this article too before we post here. But it does not help. Actually, we can not start the OS (even in safe mode). And want to see if there is anyway to bring this back online. We used to be able to do a "reinstallation" in Windows 2003 booting from CD. But it seems we can not do this anymore.

    Are we looking at the wrong way to get this fixed?

    Thanks

     
    Thursday, November 05, 2009 5:46 PM
  • Hello Chun-Chu,
    Can you try to boot to the install DVD ( or a copy of WinPE if you have one available) and choose the repair option in the lower left hand corner?
    If so can you try to run sfc with the offline options to see if the system will repair or identify corrupted files?
    Thanks, Darrell Gorter This posting is provided "AS IS" with no warranties, and confers no rights
    • Marked as answer by Chun-Chu Friday, November 06, 2009 11:43 PM
    Thursday, November 05, 2009 9:11 PM
  • Thanks Darell.

    I did a sfc with offline options and it worked.

    This is what I did.


    sfc /SCANNOW /OFFBOOTDIR=c:\ /OFFWINDIR=c:\windows

    Where "c:" is your system drive
    • Proposed as answer by mrmrjacobs Monday, May 31, 2010 4:00 PM
    Friday, November 06, 2009 11:45 PM
  • I also have the very same problem, so I did the very same as Darell suggested. I put in my CD, selected the repair option in the lower left hand corner and then selected Command Prompt, typed in: sfc /SCANNOW /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows (I used D:\ cause thats where my OS resides). After I did all of that I got a prompt back saying: There is a system repair pending which requires reboot to complete. Restart windows and run sfc again.

    Now I have restarted 3 times and got the same result. What would I do now?

    Wednesday, December 01, 2010 3:40 PM
  • I have a similar issue with the sfc utility.

    1. Booting from System Restore disc and running cmd line states there is a reboot pending. Rebooting does not fix issue, nor does rebooting and attempting system restore -> cmd utility -> sfc

    2. I have attached the hard drive via usb to a working computer and have attempted to run the sfc scan with the appropriate switches however I get the following statement, "Windows Resource Protection could not start the repair service."

     

    My guess is there is some type of file lock in place that is blocking changes.  If I find a solution I will post back.

    Wednesday, December 01, 2010 7:35 PM
  • Try  removing or renaming  x:\windows\winsxs\pending.xml
    • Proposed as answer by XReply Friday, December 03, 2010 4:21 PM
    Friday, December 03, 2010 8:17 AM
  • Partially confirmed. Running SFC /SCANNOW /OFFBOOTDIR=[C]:\ /OFFWINDIR=[C]:\WINDOWS combined with removing/renaming [C]:\WINDOWS\WINSXS\PENDING.XML is the solution to getting SFC to run properly.

     

    *Note that you must remove/rename the windows\winsxs\pending.xml from the hard-drive you are attempting to repair, not the virtual drive X: that the Repair Process tends to run off of*

    • Proposed as answer by XReply Friday, December 03, 2010 4:23 PM
    Friday, December 03, 2010 4:23 PM
  • I installed avast! Anti-Virus and whenever I would open the main UI, it would give me a Windows Side-by-Side error. I found out that Visual C++ did not install properly, but when I went to install it it would give me an error and roll back the install. I found that a possible solution was the "sfc /scannow" command. Then that led to this problem.

     

    I can confirm that deleting the "pending.xml" file will allow the SFC process to progress, even in situations where you can boot to Windows (SFC online, rather than the aforementioned offline process) but SFC is stuck.

     

    Thanks for the helpful posts in here!

    Friday, March 04, 2011 3:48 AM
  • Try  removing or renaming  x:\windows\winsxs\pending.xml
    You are my hero.. I've been looking for this for weeks.  THANK YOU!!
    Sunday, June 12, 2011 2:02 AM
  • Hello Drew,

    You do need to understand that renaming the pending.xml potentially leaves the OS in a bad state.  You have some updates that did not complete installation and now will not continue.  the pending.xml is used when the installation of an updates requires a reboot and contains the list of actions to take place after the reboot..  By renaming it, those actions will not take place.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Tuesday, June 14, 2011 6:00 PM
  • You do need to understand that renaming the pending.xml potentially leaves the OS in a bad state.  You have some updates that did not complete installation and now will not continue.  the pending.xml is used when the installation of an updates requires a reboot and contains the list of actions to take place after the reboot..  By renaming it, those actions will not take place.

    So if that is not the way to repair the system, then what is?

     

    Mike Roberts

    Wednesday, June 29, 2011 7:00 PM
  • Hello,

    You would need to trouble-shoot why the update did not complete the installation, potentially rolling it back, using the logs on the system to help understand why it's failing.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Thursday, June 30, 2011 7:18 PM
  • Try  removing or renaming  x:\windows\winsxs\pending.xml
    You are my hero.. I've been looking for this for weeks.  THANK YOU!!

    Dont confuse the x: with the recovery mount x:

    The proper method here is to rename/remove the c:\windows\winsxs\pending.xml

    Just a tip.

    Tuesday, December 06, 2011 6:53 PM
  • Hi,

     

    I wrote a post on performing an offline integrity verification that might help someone out,

    http://mikemstech.blogspot.com/2011/12/how-to-perform-offline-system-integrity.html


    -- Mike Burr
    Technology
    • Proposed as answer by redyolk1 Friday, May 11, 2012 1:00 AM
    Tuesday, December 20, 2011 7:00 AM
  • I ran into the same error, and found another topic that the trustedinstaller service has to be set to automatic for this to work.

    To do that, use the sc.exe command.  if you are booting from the OS DVD, it may not be there - I found it on the hard drive I was trying to repair, in the windows\system32 folder...

    sc config trustedinstaller start= auto

    NOTE: there must be a space between "=" and "auto" as shown above.  Once this is set, the sfc can start the trusted installer service as it does its work - you do not need to start it yourself

    • Proposed as answer by wilmiester Friday, January 25, 2013 3:53 AM
    Wednesday, January 11, 2012 5:07 PM

  • Hi,

     

    Please refer to the following article to troubleshoot this issue:

     

    http://www.winhelponline.com/blog/fix-for-error-windows-resource-protection-could-not-start-the-repair-service-when-running-sfc-in-vista/

     

    Hope it helps.

     

    Tim Quan - MSFT

    this solved my problem.  excellent find.

     

    thank you so much.

    Friday, January 27, 2012 7:48 PM
  • I have a similar problem but none of the suggestions in this thread worked for me. I am booting from a Vista SP2 RTM dvd and running 'sfc /scannow /offbootdir=c:\ /offwindir=c:\windows\' but it doesn't work.
    I have the same error messages as the original poster - the repair service could not be started, and trustedinstaller won't start either with error 1067. I deleted the pending.xml but still same errors. Any other ideas as to what could be the cause?
    Monday, February 20, 2012 7:26 PM
  • For you and anyone else who's trying to run sfc from the Windows RE or WinPE...

    Make sure you know if your computer has a Recovery Partition installed or not. Some of the recovery environments (standard Windows RE included) assign drive letters in sequential order based on the first, second, etc partitions created on the drive. Since OEM Recovery Partitions are usually the first on the drive they are given the "C:" drive and the System Partition becomes the "D:" drive. I had the same issues starting SFC as those above until I realized I had to use the 'offline' switches for SFC i.e. sfc /scannow /offbootdir=*:\ offwindir=*:\Windows and remember that * is the drive letter given to your system partition. In my case it was "D:"

    Saturday, March 31, 2012 11:26 PM
  • SYMPTOMS:

    All attempts to run command:


    sfc /SCANNOW


    keep returning the following message:

    "Windows Resource Protection could not start the repair service"


    SOLUTION:

    If you are using any kind of boot image/disk to boot up, you will have to use the "offline" switches (OFFBOOTDIR & OFFWINDIR) along with the SFC /SCANNOW command in order to start repairing your instalation properly.

    1. please remember to tripple-check for corret partition letters, because this is a crucial parameter for SFC to start working properly.
    2. also make sure to confirm whether so called "recovery" partion exists in your specific scenario or not. If so, in most cases this will render the "recovery" partition being the one to be set as a boot partition (OFFBOOTDIR) within sfc command, while Windows system folder (OFFWINDIR) will actually reside on a different partition.


    My scenario is described exactly above and therefore in my case boot partition letter was C: and system partition was D: ...As of that - the proper command line to run SFC successfuly was:


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


    Successful scan for integrity of all protected system files and replacement of incorrect versions with correct Microsoft versions then looks like this:


    X:\sources>sfc /SCANNOW /OFFBOOTDIR=c:\ /OFFWINDIR=d:\Windows

    Beginning system scan. This process will take some time.

    Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.log

    windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log


    Once SFC scan completed, I have run the Startup Repair from the repair dialogue menu prior rebooting the system. Remember to click "Cancel" on the prompt for using the System restore in this step. I am assuming you have tried this already time ago and confrmed it did not resolve the problem, but most importantly - you really would not want to overwrite the files, which you have just repaired with any possibly corrupted ones ;)


    After this I've unplugged bootable USB key with the My Windows Vista Enterprise 64bit setup disk image and restarted computer. System booted up properly on first attempt. No issues have been identified as a result of my post boot checks. This completely resolved the issue in my case. Should you have questions, please let me know.


    Pavel

    • Edited by pablotextoris Sunday, April 08, 2012 4:53 AM
    • Proposed as answer by zaboq Sunday, July 08, 2012 9:19 AM
    Sunday, April 08, 2012 4:34 AM
  • The path variable is not set with the repair option.

    You can navigate to your windows\system32 folder and run SFC. In my case, it was d:\win\sys32

    Alternately, you don't need to start any additional services like the TrustedInstaller, but if you do wanna get cute, SC and net start can be run from the above noted directory

    lastly, as silly as this sounds, make sure your using an x86 for x86 and x64 for x64 CD... interestingly, the repair doesn't alert you to a build for a diff CPU architecture...

    "It's never worth the pain that you feel" - Queensrhyche

    • Proposed as answer by bytmee Sunday, July 01, 2012 2:56 AM
    Sunday, May 06, 2012 2:55 AM
  • I had a simular problem with a failed Server 2012 upgrade. When I attempted to run the sfc offline I was getting the same WRP could not start.

    I found that WinPE had miss labelled my drive letters, and the offline windows directory was now on E:\. So just confirm that your offline boot/win directories haven't changed drive letters.

    Tuesday, September 25, 2012 7:58 AM
  • Here's one thing to check. (This explained and solved the problem for me, unlike all the other things suggested by everyone else):

    Go to an elevated cmd.exe prompt and type 

    echo %processor_architecture%

    If you get back x86, you may be trying to run "sfc" on a 64-bit machine from the 32-bit cmd.exe in SysWow64.

    The different versions of cmd.exe are in %windir%\SysWow64 and %windir%\system32 (and other places too as hard links).

    You'd think that the one in SysWow64 would be the 64-bit version, right? Wrong. SysWow64 is part of the sleight-of-hand Microsoft does to make 32-bit applications run seamlessly on a 64-bit Windows. SysWow64 works with System32, which is where the 64-bit versions can be found. Makes perfect sense, right?

    Apparently sfc can't run properly from the 32-bit cmd.exe found in SysWow64. Further, Microsoft in its wisdom neglected to include a useful error message for this condition, so this is one of the most frustrating questions answered poorly in the forums. Thanks Microsoft!

    So the solution is to try the cmd.exe found in each of those two directories, right-clicking on them and choosing "Run as administrator". One will give you this error, the other will work properly.

    • Proposed as answer by Ferret141 Monday, March 24, 2014 9:24 PM
    Saturday, February 02, 2013 8:31 PM
  • This worked thanks.
    Monday, August 12, 2013 9:16 PM
  • This worked for me to get SFC to run.  Thank you!
    Sunday, August 25, 2013 1:43 AM
  • Yessssssss......it worked. Thankyou all of you!

    I restored a downed SQL Server virtual machine that was part of a cluster. I was under pressure to quickly restore this one.

    SFC /SCANNOW /OFFBOOTDIR=D:\ /OFFWINDIR=D:\Windows

    My Windows appeared to be in D:\ when booted from a virtual DVD media in Hyper-V.

    Thanks again folks!

    Monday, November 25, 2013 8:17 AM
  • I was getting this same error when I ran SFC /SCANNOW from X:\

    This was likely because Windows isn't in C:\. It is in D:\. It happens when you boot from a DVD and try to repair corrupt Windows.

    Please read below how i fixed my problem.

    Monday, November 25, 2013 8:21 AM
  • This worked perfectly for me after trying everything else.  Thanks for the answer!
    Monday, December 30, 2013 12:40 AM
  • Run the command prompt as Administrator
    Tuesday, May 27, 2014 6:50 AM
  • Deu certo, obrigado!
    Tuesday, June 10, 2014 1:46 PM
  • Here's one thing to check. (This explained and solved the problem for me, unlike all the other things suggested by everyone else):

    Go to an elevated cmd.exe prompt and type 

    echo %processor_architecture%

    If you get back x86, you may be trying to run "sfc" on a 64-bit machine from the 32-bit cmd.exe in SysWow64.

    The different versions of cmd.exe are in %windir%\SysWow64 and %windir%\system32 (and other places too as hard links).

    You'd think that the one in SysWow64 would be the 64-bit version, right? Wrong. SysWow64 is part of the sleight-of-hand Microsoft does to make 32-bit applications run seamlessly on a 64-bit Windows. SysWow64 works with System32, which is where the 64-bit versions can be found. Makes perfect sense, right?

    Apparently sfc can't run properly from the 32-bit cmd.exe found in SysWow64. Further, Microsoft in its wisdom neglected to include a useful error message for this condition, so this is one of the most frustrating questions answered poorly in the forums. Thanks Microsoft!

    So the solution is to try the cmd.exe found in each of those two directories, right-clicking on them and choosing "Run as administrator". One will give you this error, the other will work properly.


    Fantastic
    Thursday, June 19, 2014 8:58 AM
  • Hi,

     

    Please refer to the following article to troubleshoot this issue:

     

    http://www.winhelponline.com/blog/fix-for-error-windows-resource-protection-could-not-start-the-repair-service-when-running-sfc-in-vista/

     

    Hope it helps.

     

    Tim Quan - MSFT


    Thanks, this solved sfc /scannow problem.
    Thursday, September 11, 2014 10:50 AM