SFC Windows Resource Protection could not perform the requested operation FIX! RRS feed

  • General discussion

  • Over the past few weeks I have experienced several interesting problems between my two computers. Of particular note was an issue I discovered when the Event Viewer on my Windows 7 Ultimate 32-bit machine failed. After some troubleshooting I decided to attempt SFC /scannow. I got the error message "Windows Resource Protection could not perform the requested operation." This worried me. So I attempted to boot into WinRE from my Win 7 installation disk. The result in WinRE was the same. No good.

    I scrounged forum after forum looking for an answer, but nothing worked. It seemed like everyone just gave up and reinstalled their OS, but I would not do that. So I kept exploring. CBS.log showed nothing of interest as sfc never made it past "Beginning verification phase of system scan."

    Finally I found this article: which, while interesting and comprehensive, did not directly solve my issue. It did, however, point me to the registry key:


    This registry entry does not appear to exist in Win 7, but another entry in it's vicinity caught my attention:


    I had recently moved my program files dir to a different hard drive and placed a junction point in it's place. In the process I had altered HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir to point to "D:\Program Files\", then back to "C:\Program Files\" when the junction point was in place.

    "C:\Program Files\" is incorrect!

    the trailing backslash is incorrect, and must be removed!

    with the ProgramFilesDir value set to "C:\Program Files" I ran sfc /scannow and it scanned properly, finding several corrupt files (some of which required checking cbs.log to repair).

    I can imagine that some virus maker somewhere will use this to break SFC in the future, but here's your solution!

    So to review: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir cannot have a trailing backslash!

    Tell your friends! :)


    Sunday, January 8, 2012 6:57 PM

All replies

  • Hi,


    Thanks for sharing. We really appreciate your time and efforts. Hope your experience will help other community members facing similar problems.

    Leo Huang

    TechNet Community Support

    Tuesday, January 10, 2012 2:20 AM
  • Iv been having a similar problem first noticed a problem with error msgs when trying to run certain installers, tried to do sfc scan got same msg as you after researching it I felt in the same spot as you then I saw your post, unfortunately that did not work for me either there was no \ in ProgramFilesDir value.
    Thursday, January 12, 2012 12:00 AM
  • I had the same error and was able to get it to run using this command:

    sfc /scannow /offbootdir=c:\ /offwindir=c:\windows

    Tuesday, June 12, 2012 7:29 PM
  • This article looked promising, but my registry already had the correct entry. =/
    Friday, July 6, 2012 3:34 PM
  • I had the same error and was able to get it to run using this command:

    sfc /scannow /offbootdir=c:\ /offwindir=c:\windows

    This worked for me - thank you for sharing :0)
    Wednesday, July 18, 2012 8:33 AM
  • this command does not work for me:


    C:\Windows\system32>sfc /scannow /offbootdir=c:\ /offwindir=c:\windows

    The arguments passed to sfc are invalid.  The offline windows directory
    specified points to the online system.

    Sunday, August 5, 2012 5:45 PM
  • Hi Uncle_vara

    I realise this might be too late, but the error tells you that you have to specify the correct drive letters.

    "offbootdir" is the system reserved patition (usually about 100MB in size).

    "winbootdir" is the windows directory on the drive you would like to fix.

    You can view the different drives (volumes) by using the DISKPART utility. In elevated command prompt (or PowerShell), type


    to enter the Disk Partitioning Console, then type

    list volume

    to view your machine's volume details

    Thank you to Crosmanrond!!! There was a power failure on my Windows 2008 R2 system while it was doing an update to Service Pack 1, and I have been struggling for a week to get sfc to run. While installing Java earlier, I received and error telling me Java could not find the %CommonProgramFiles(x64)%\ directory.

    The SFC scans also only got to 15% and would then give me the same error "Windows Resource Protection could not perform the requested operation."

    I did what you suggested - changed all the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir keys from e.g. "%ProgramFiles%" to "C:\Program Files" and the scan completed successfully.

    Thanks a million!

    • Edited by Stone Three Monday, October 15, 2012 9:12 AM wrong service pack number
    Monday, October 15, 2012 9:11 AM
  • I know this is a bit old, but I was having the same issue and this is still the second result via Google.

    None of the above solutions helped me but the suggestion of using /offbootdir and /offwindir gave me the error that the drive isn't offline (makes sense since I was booted to the OS on that drive).

    I pulled the drive and hooked it up via eSATA to another computer and was able to run sfc /scannow /offbootdir=f:\ /offwindir=f:\windows (F: being the drive letter when I hooked it up).

    The scan worked but didn't return any errors. I'm not looking for help, just posting to help others that might find this.

    Wednesday, November 28, 2012 8:29 PM
  • Odd thing I noticed that my System Volume has no letter.  Is this normal?

    Microsoft DiskPart version 6.1.7601
    Copyright (C) 1999-2008 Microsoft Corporation.
    On computer: LARRY-PC

    DISKPART> list volume

      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      Volume 0     F DVD-ROM         0 B  No Media
      Volume 1        System Rese  NTFS   Partition    100 MB  Healthy    System
      Volume 2     C NTFS   Partition    931 GB  Healthy    Boot
      Volume 3     D   Backup B     NTFS   Partition    232 GB  Healthy
      Volume 4     E   Removable       0 B  No Media


    Friday, December 14, 2012 1:36 PM
  • My system reserved partition doesn't even show up:

    DISKPART> list volume

      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  -----
      Volume 0     D                       DVD-ROM         0 B  No Media
      Volume 1         Recovery     NTFS   Partition     14 GB  Healthy    Syste
      Volume 2     C   OS           NTFS   Partition    283 GB  Healthy    Boot

     Not to mention the Recovery Volume has not drive letter.

    I'm trying to fix a PC for a client that got a nasty trojan on here. I've removed the malware, but cannot create a restore point nor do a sfc/ scannow command process beyond 10% which gets me the error everyone has flocked here for. I also tried the later command left here and got the error message others have gotten because of it. I'm guessing without specifying the correct partition letter in the command I will be unable to execute it. 

    Monday, April 21, 2014 7:22 PM
  • I had the exact same issue, as unlikely as this sounded to me, I disabled my Windows Firewall and tried running the scan again -- this was successful!!!  Windows firewall was blocking the Windows application from doing its verification and completing the scan... go figure! Try and see if it helps.  
    Monday, August 25, 2014 9:02 PM
  • I had the exact same issue, as unlikely as this sounded to me, I disabled my Windows Firewall and tried running the scan again -- this was successful!!!  Windows firewall was blocking the Windows application from doing its verification and completing the scan... go figure! Try and see if it helps.  

    This also worked for me. Thanks!
    Tuesday, September 30, 2014 6:59 PM
  • Good call, thank you! Disabling Windows Firewall worked for me too.
    Tuesday, November 3, 2015 6:40 PM
  • Hi 

    Realize this was posed years ago

    Would you mind posting detailed instructions?

    Have the same error, found and made following changes in registry as suggested in your last paragraph: 



    Thank you

    Saturday, December 2, 2017 3:34 PM