You run the System File Checker (SFC) tool in Windows 10 and get the message "Windows Resource Protection could not perform the requested operation." This error usually means another process has locked system files, or the Windows Modules Installer service isn't running. SFC relies on Windows Resource Protection (WRP) to verify and replace protected system files. If WRP can't access those files, the scan fails. Understanding why this happens and how to fix it is key to keeping your Windows system healthy—especially if you're setting up a development or security lab on Windows.

What Causes the WRP Error?
Windows Resource Protection is designed to block unauthorized changes to critical system files, registry keys, and folders. When SFC tries to check these protected resources, any of these conditions can trigger the "could not perform the requested operation" message:
- Service not running: The Windows Modules Installer service (TrustedInstaller) must be active. SFC uses this service to access protected resources.
- File locks: A running process (e.g., antivirus, backup software, or even Windows Update) may have a lock on a protected file, preventing SFC from reading it.
- Corrupted component store: If the side-by-side store (WinSxS) is damaged, SFC cannot retrieve the correct file versions.
- Disk errors: Bad sectors or file system corruption can block read/write operations on system files.
- Boot configuration issues: A misconfigured boot entry or missing recovery environment can prevent SFC from running in offline mode.
Step-by-Step Fixes
Try these solutions in order. Each method builds on the previous one, and most can be performed without advanced tools.
1. Run SFC from the Windows Recovery Environment (WinRE)
Booting into the recovery environment ensures that the main operating system is not running, so file locks are minimized. To do this:
- Restart your PC and press F11 (or the manufacturer-specific key) during boot to enter the recovery menu. Alternatively, hold Shift while clicking Restart from the login screen.
- Go to Troubleshoot > Advanced options > Command Prompt.
- In the Command Prompt, type
sfc /scannow /offbootdir=C: /offwindir=C:Windows(adjust drive letters if Windows is installed elsewhere). - Wait for the scan to complete. If WRP still fails, proceed to the next fix.
2. Run DISM First to Repair the Component Store
DISM (Deployment Imaging Service and Management) can fix corruption in the system image that SFC depends on. Open an elevated Command Prompt (Run as Administrator) and run:
DISM /Online /Cleanup-Image /RestoreHealth
This command connects to Windows Update to fetch healthy files. If you have limited internet, use a local source:
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:RepairSourceWindows /LimitAccess
After DISM completes, restart and try sfc /scannow again.

3. Verify the Windows Modules Installer Service
Press Win + R, type services.msc, and press Enter. Locate Windows Modules Installer. Ensure its status is Running and the startup type is Manual (or Automatic). If stopped, right-click and select Start. If the service fails to start, check for underlying corruption using DISM.
4. Boot into Safe Mode
Safe Mode loads only essential drivers and services, reducing the chance of file locks. To boot into Safe Mode:
- Open Settings > Update & Security > Recovery.
- Under Advanced startup, click Restart now.
- After reboot, choose Troubleshoot > Advanced options > Startup Settings > Restart.
- Press 4 or F4 to enable Safe Mode.
- Run
sfc /scannowin an elevated Command Prompt.
5. Check Disk for Errors
File system corruption can prevent WRP from reading files. Run chkdsk C: /f /r in an elevated Command Prompt. You will be prompted to schedule the check on next reboot. Restart and let it complete. Afterward, attempt SFC again.
6. Perform a System Restore or In-Place Upgrade
If none of the above work, the corruption may be deep. Use System Restore to revert to a point before the error appeared. If that fails, an in-place upgrade using the Windows 10 Media Creation Tool preserves your files and apps while replacing system files. Download the tool, run it, and choose Upgrade this PC now. This is a legitimate, safe recovery method that does not require reinstallation of software.
Understanding WRP for Security Learners
Windows Resource Protection is a security feature that enforces file integrity. For developers and cybersecurity students, knowing how to diagnose and repair WRP errors is part of maintaining a trustworthy system. A compromised or corrupted system file can be an entry point for malware or cause unpredictable behavior in your development environment. Regularly verifying system integrity with SFC and DISM is a good habit — analogous to checking checksums on downloaded software.
If you are building a lab for penetration testing or secure coding practice, ensure your host OS is clean. The same principles apply: only run trusted tools, keep backups, and use recovery options that Microsoft provides. Never attempt to bypass WRP or modify protected files manually — that defeats the purpose of system protection and can leave your machine unstable.
Final Step: Verify the Fix
After applying these steps, run sfc /scannow again in a normal boot. If it completes with the message "Windows Resource Protection found corrupt files and successfully repaired them" or "did not find any integrity violations," the error is resolved. For persistent issues, consider a Windows 10 in-place upgrade using the Media Creation Tool — this replaces all system files while keeping your data and applications intact. This approach is safer than a full reset and often resolves deep-seated WRP problems.
