SFC Error “Windows Resource Protection could not start the repair service”

When you run the System File Checker (Sfc.exe) using the /scannow parameter to restore missing or corrupt system files, the following error may occur.

Windows Resource Protection could not start the repair service.

SFC error - Windows Resource Protection could not start the repair service

Additionally, you may experience problems running Windows Installer Setup files and installing fixes from Windows Update.

Cause

The above error occurs due to one or more of the following reasons:

  1. The TrustedInstaller (Windows Modules Installer) service is disabled. The TrustedInstaller service has full access to Windows Resource Protection (WRP) files and registry keys. This service needs to be running to restore missing or corrupted WRP resources. The TrustedInstaller service starts on-demand when running the System File Checker.
  2. The supporting DLL files required to run Sfc.exe may be missing. Some of the modules needed are wrpint.dll and wrpintapi.dll. The missing module names will be reported in the CBS.log located in the C:\Windows\System32\CBS\ folder.
  3. There is file system corruption on the system drive. This will be evident if DISM reports the error 1392 (“File or directory is corrupted”).

Solution

1) Start the Trusted Installer Service

To resolve the “Windows Resource Protection could not start the repair service” error, set the startup type of the Windows Modules Installer (“TrustedInstaller”) service to manual.

  1. Right-click Start, and click Run to launch the Run dialog.
  2. Type services.msc, and click OK.
  3. Double-click Windows Modules Installer.
  4. Set its Startup type to Manual
  5. Click OK.

Using Command-line

To accomplish the same using command-line, open Command Prompt as administrator. Run the following commands.

sc config trustedinstaller start= demand
net start trustedinstaller

That should fix the problem. Another option would be to run Sfc /scannow in offline mode (Windows Recovery Environment).


2) Restore Missing DLL files

Open the C:\Windows\Logs\CBS\CBS.log file and see if you find entries like the ones below:

Info CBS TiWorker: Client requests SFP repair object.
Info CBS Failed to load sfp DLL from path: C:\WINDOWS\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22000.975_none_0493932d4c9bedcc\\wrpint.dll [HRESULT = 0x8007007e - ERROR_MOD_NOT_FOUND]
Info CBS Failed to initialize WRP integrity check and repair. [HRESULT = 0x8007007e - ERROR_MOD_NOT_FOUND]
Info CBS TiWorker: Client requests SFP repair object.
Info CBS Failed to load sfp DLL from path: C:\WINDOWS\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22000.975_none_0493932d4c9bedcc\\wrpint.dll [HRESULT = 0x8007007e - ERROR_MOD_NOT_FOUND]
Info CBS Failed to initialize WRP integrity check and repair. [HRESULT = 0x8007007e - ERROR_MOD_NOT_FOUND]
Info CBS Failed to get class factory for service: 1 [HRESULT = 0x8007007e]
Info CBS Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP

[Scroll horizontally to see the missing file name(s) and the version]

If you find those errors in the log file, download the exact version (which, in this case, is 10.0.22000.975) of the file wrpint.dll from Microsoft via WinBIndex.



Also, check if the file C:\Windows\Servicing\wrpintapi.dll exists. If it’s missing, you need to download the appropriate version of the file via WinBIndex.

Instructions for copying those files

  1. Copy the downloaded DLLs to “C:\DLLs\”
  2. Start Command Prompt as TrustedInstaller by downloading AdvancedRun (More Information).
  3. Close AdvancedRun.
  4. Run these commands from the Command Prompt (TrustedInstaller) window:
    (Note: The winsxs subfolder name below corresponds to the above CBS.log entries. Please change the path accordingly in your case.)

    cd /d C:\DLLs
    copy wrpint.dll "C:\WINDOWS\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22000.975_none_0493932d4c9bedcc\"
    copy wrpintapi.dll C:\Windows\Servicing\
    exit
    
  5. Open admin Command Prompt, and try running SFC /SCANNOW now. It should run fine.

3) Repair disk errors using Chkdsk

Open an admin Command Prompt and run the following command:

chkdsk c: /r

Press Y when you’re prompted to schedule the volume fixed by Chkdsk upon the next restart.

Let Chkdsk complete the repairs on the next startup.

After loading Windows, try running “Sfc /scannow” again.

Please see the article DISM Error 1392 – File or directory is corrupted for detailed information.

(Information in this article applies to all versions of Windows, including Windows 11.)


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

31 thoughts on “SFC Error “Windows Resource Protection could not start the repair service””

  1. Thank you Ramesh.

    The ‘Turn Windows Features on or off’ for Windows 7 Ultimate was coming up blank on a client’s machine and I couldn’t get the ‘sfc /scannow’ to work. I followed the instructions and everything works great now.

    He had gone in and turned off what a friend said was ‘unnecessary services’. In less than 5 minutes I had made 200 USD and he said his ‘friend’ would pay him back.

    RJ Morey
    Midnight Engineers
    Santa Rosa, California
    USA

    Reply
  2. Thank you so much !
    This soved MANY problems:
    SFC / Scannow error
    EMpty List on WIndows On Off Features:
    1935 Errors

    Thanks !!

    Reply
  3. mine was on manual and i was still getting teh same problem, however I then right clicked ” Windows Modules Installer ” and clicked Start – then tried the sfc /scannow & it worked.

    – fixed my problem! get in!

    Reply
  4. Being on Manual, then you can start the service.
    It should work now

    The problem was, if it was on automatic and if you start the service it automaticaly stops.

    Reply
  5. What if I cannot start Windows at all? My problem is that when I try to start up my computer it gives me something about the Kernel is either missing or corrupted. Tried using Startup Repair, but when it runs through and I restart, it still won’t let me get into windows.

    I have a HP G60 with Windows Home Premium.
    I really don’t want to install windows again..

    Reply
  6. Windows Modules Installer is Manual and started, but I still get the Windows Resource Protection could not start the repair service.

    Reply
  7. My “Windows Modules Installer” is presently set as you display above – still will not run “sfc /scannow” or “sfc /verifyonly”

    results: “Windows Resource Protection could not start the repair service”

    Reply
  8. You’re an absolute gem!!!! Microsoft auto-fix and what have you from Microsoft did not fix it at all. I looked everywhere online for days and days and found this. I’ve given up hope and this was like the answer to my prayer. Great job!!! I like to hug and kiss yah…. You are a Godsend! Microsoft couldn’t fix the damn thing – you did!!!!! thank you thank you thank you!

    Reply
  9. Hi – when i want to change it to “mannual” under general it is greyed out at automatic. can you please tell me how i can change it to “mannual”

    Reply
  10. I have a question on how to access services.msc from the command prompt to reset the Windows Resource Protection. I have the black screen of death on windows vista and have only access through the command prompt from my operating system disc (outside of windows). I want to try to do a sfc/scan but wont start. I have an nvvsvc.exe error that caused the bsod, I pulled the graphics card and I am running the video through the mother board. still in bsod. the system wont boot in to any mode. only access is through the operating system disc. I tried to upgrade vista in place but it tells me I am outside of windows so I cant load windows that way. tired of the technicians telling me to click the start button on a black screen of death. thanks

    Reply
  11. I had the same problem today while searching the web I found a solution go to start, insert the word services then press enter, then it will give you a list of all the services that have been disabled, stop, or are running, you click the desire services you wish to enable and the proceed to put instead of disable, automatic start, you should read carefully all the processes and services you wish to automatically start because it can clogged or slow your computer. If you dont know what services to start click automatic to all. Then do a restart, it should automatically start with internet and audio options functioning. The sfc, the windows registry, the diagnostic service, the trusted services and the shalow service are all there.

    Reply
  12. error 126: windows modules installer could not be found.
    I cannot install updates
    win 7 64X NO SERVICE PACK 1
    3 YEARS, NO UPDATES

    Reply
  13. Something worth noting…in vista the trustedinstaller service appears as Windows Module Installer. So when looking at the services you need to check if the Windows Module Installer has been disabled. I spent hours working on this because I was looking for a service called TrustedInstaller. 🙁

    Reply
  14. It seems to be set to ‘Manual’ by default. I just did this on a clean install of Windows 7 Professional 64-bit, and it was already set to manual. That also means that this isn’t the thing preventing me from doing the things from your “How to Run the System File Checker (Sfc.exe) Offline in Windows 7 and Vista” article, it’s something else :/

    Reply
  15. I tried everything here, and many other things described elsewhere, and nothing fixed the “Windows resource protection could not start the repair service” when running “sfc /scannow”.
    Decided to look at the “C:\Windows\Logs\CBS\CBS.log” file, which is where SFC.exe logs its progress. There were many entries in the CBS.log file, so I decided to try to delete CBS.log to get a clean log run. I was able to delete CBS.log, and then ran SFC.exe to see if the log would give me a hint as to the real problem. “sfc /scannow” THEN RAN PROPERLY! I suspect CBS.log file had become corrupted and caused this error. Give it a try.

    Reply

Leave a Reply