sfc.dll "contains an error"

Discussion in 'Windows 10' started by sublimate, Feb 7, 2017.

  1. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    I am trying to help recover a PC running Windows 10 that appears to have had damage to a system file (perhaps a disk error, virus); or maybe this is a registry problem show how.

    When logging in (to any account) the message appears:
    rundll32.exe - Bad Image
    C:\WINDOWS\SYSTEM32\sfc.dll is either not designed to run on Windows or contains an error.
    Error status 0x000012f.

    It turns out this error had been present for some time, and is now written into the system image backups :(.

    Searching for fixes I have found suggestions to run a system reset, run "sfc /scannow" to fix system files, and run "Dism /RestoreHealth" (with WIM or ESD Windows 10 distributions). None of these solves the problem. I have tried a reinstall from a virtually mounted ISO; this gives an error message (I didn't record the error code).

    I am guessing that sfc.dll is key to any system repairs short of an install from scratch, and to function all the above require sfc.dll and/or related registry entries (if these cause the .dll error message).

    Next step I will try a recovery or clean install from a USB ESD.

    Unless someone can suggest how to specifically repair sfc.dll (apparently the critical hub for system repairso_O) ?
     
  2. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,365
    210
    #2 lobo11, Feb 7, 2017
    Last edited: Feb 7, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. glennsamuel32

    glennsamuel32 MDL Senior Member

    Jul 15, 2012
    271
    87
    10
    You should do the manual upgrade by extracting the iso into a freshly formatted usb stick...
    Then you'll have the option of saving your programs and personal files...
    You cannot virtually mount the iso and install...

    Anyway, I would just boot up with Ubuntu and copy and replace that file...
     
  4. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    Cheers, and understood, I am nervous about registry cleaners.

    I have tried in place repairs including DISM with source from the latest ISO (assuming that is correct to go with the latest, or should this be source for the installed build?); but I get setup failure messages.

    I will try the next stage with a USB ESD from the media creation tool (on my next visit, PC in another town).
     
  5. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    Thanks; I expected that would be my next step (I should have had a USB prepared for my last visit, I was betting on an in place recovery working; should have known sfc.dll was a bad sign).

    Interesting. I wondered if there might be such a trick. I'm not familiar with Linux boots, but looks like it would be useful to learn; cheers.
     
  6. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,468
    1,355
    120
    Usually if you received this message, the error is not in the sfc.dll file, but elsewhere. Normally, with the file sfc.dll does not happen nothing never.So, I recommend to search for corrupted system files. But rarely is possible to improve, even if You found the reason.
    Usually there is also no corrupted rundll32.exe.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    Thanks, I was wondering if this was registry problems, or something else other than the sfc.dll file itself; it is a tiny file after all and even sfc.exe is very small. sfc seems rather central so maybe this is the "tip of the iceberg". A sfc scan didn't repair the problem (and seems recursive), so points to a USB ESD recovery/reinstall I expect. I will try that in a week or so when I get another look at the machine.
     
  8. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    Thanks, I will give this a try (in a week or so). The damaged OS is basically toast at present, so I can't make it worse :); a chance to experiment.
     
  9. LatinMcG

    LatinMcG Bios Borker

    Feb 27, 2011
    5,700
    1,600
    180
    sfc /offbootdir and /offwindir from usb command prompt might do the trick.
     
  10. Hadron-Curious

    Hadron-Curious MDL Guru

    Jul 4, 2014
    3,725
    600
    120
    As the Reset doesn't work you can do a fresh install on top of previous Windows 10 OS that is dysfunctional. You can later transfer your important data from Windows 10.old directory instead of resorting to boot up with Linux live CD as suggested by somebody.
     
  11. PhaseDoubt

    PhaseDoubt MDL Expert

    Dec 24, 2011
    1,439
    275
    60
    This. Or boot a Linux LiveCD as suggested, copy off all your important data and do a wipe and clean install. If you're as uncertain as you sound about rebuilding, you just might be better served by backing up your data and starting over with a clean install. Then make a system image of your new stable system in the event you get into this fix again.
     
  12. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,365
    210
    When you run this Cmd in Cmd Prompt, does it say it is repairable

    Dism /Online /Cleanup-Image /CheckHealth
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    Cheers LatinMcG, I was thinking Reset as a first step, but good idea, that could save time (I expect Reset is rather more than a sfc pass; handy as next effort will be with a short visit). I will give it a go, and report back.
     
  14. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    #15 sublimate, Feb 7, 2017
    Last edited: Feb 7, 2017
    (OP)
    I didn't make a note of the message, but from memory (the machine is in another town) I went straight to /RestoreHealth and the error message was "found corrupt files but was unable to fix some of them” (with and without /source, and trying both WIM and ESD - from the latest ISO - as sources) . I also tried in Safe Mode, with the same result (or at least another error message, I forget which). And I tried multiple passes, and running sfc /scannow afterwards; no luck.
     
  15. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,365
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    That was my next step after first attempts with sfc and DISM (Reset with the running OS), but no luck. I will try the suggestion from LatinMcG of sfc /offbootdir from the USB boot, and then reset from USB if that doesn't work.
     
  17. glennsamuel32

    glennsamuel32 MDL Senior Member

    Jul 15, 2012
    271
    87
    10
    #18 glennsamuel32, Feb 7, 2017
    Last edited: Feb 7, 2017
    You have become quite a troll over here, haven't you ?
    Do you know how long it takes to replace a dll when booting into Linux, as compared to a fresh install and then moving over data ?
    Quite obvious you haven't gone this far into the woods...
    If you haven't done it, better to keep silent...
     
  18. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,365
    210
    If all fails do hard format first, Bring up Admin Cmd Prompt
    Type Format C:
    enter label - -drive name
    y/n

    let it finish, then inset usb stick reboot :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. sublimate

    sublimate MDL Novice

    Oct 22, 2015
    16
    1
    0
    I meant to ask; to try your suggestion of replacing the damaged file while running Ubuntu (a useful experiment I think, albeit maybe the file isn't really the problem), where can I source a clean version of sfc.dll? All the machines I have to hand are 64 bit, while the PC I am trying to fix is 32 bit (so I don't have a running machine with a good OS to copy from). Can DISM or something pull a specific file like this from an ESD or WIM?