[SOLVED] SFC / SFCfix.exe - corrupted system file (.NET Framework)

EvilClivE

Contributor
Joined
May 22, 2016
Posts
37
Location
England, UK
Hi there,

I appreciate that you get a lot of these, so I'll keep it short, and jump right in:


System
Win10 x64 Build 10586 (free upgrade from Windows 7 x64)

Problem Summary
Randomly started getting errors when running applications that use the Microsoft .NET Framework, specifically the mscoree.dll file.

The "mscoree.dll is not designed to run on Windows / bad image" error, was the initial error.

The affected apps are crucial ones, that I use every day.

My attempts to fix the problem
After trying to repair all .Net Framework versions, using tools such as "The .NET Framework Repair Tool" and ".NET Framework cleanup tool", running SFC before and after, in and out of safemode, lots of times, I still have the error.

Out of sheer desperation of not being able to find a clear solution, after several entire days of searching, I manually downloaded a different version of the mscoree.dll file, and booted into Linux from a usb drive, to overwrite the protected system file. (Yes, I hold my hands up - I know that's not a good idea)

I have also messed up folder permissions/ownership for windows\system32 (and x64 equivalent).

This has allowed me to run some of the affected applications (with an error saying I don't have the required/requested .NET version) but others will quit after displaying an error.



SFCFix.txt
SFCFix version 3.0.0.0 by niemiro.
Start time: 2016-05-22 15:50:58.928
Microsoft Windows 10 Build 10586 - amd64
Not using a script file.


AutoAnalysis::
WARNING: Failed to get store name from identity name with return code 2 for component NetFx-MSCOREE_DLL and file mscoree.dll. File is reported as corrupt by SFC.
CORRUPT: mscoree.dll of component NetFx-MSCOREE_DLL.


SUMMARY: Some corruptions could not be fixed automatically. Seek advice from helper or sysnative.com.
CBS & SFC total detected corruption count: 1
CBS & SFC total unimportant corruption count: 0
CBS & SFC total fixed corruption count: 0
SURT total detected corruption count: 0
SURT total unimportant corruption count: 0
SURT total fixed corruption count: 0
AutoAnalysis:: directive completed successfully.


Successfully processed all directives.
SFCFix version 3.0.0.0 by niemiro has completed.
Currently storing 0 datablocks.
Finish time: 2016-05-22 16:28:20.738
----------------------EOF-----------------------

I hope that I've successfully followed all the correct protocols for posting this SOS plee, It does feel like a bit of a cheeky first post, to a new forum!

I prefer to usually search forums until I can fix an issue myself, (I'm a software dev after all!) rather than risk looking ignorant and posting an issue that has been solved many times.

After days of searching and trying everything I can think of, I really hope you are able to help me out, and would be extremely grateful for your assistance.

Thank you for setting up a forum like this.

Regards,

Clive
 
Hi and welcome to Sysnative. Let's see what we can do. Please start with the following.

Step#1 - SFCFix Script
Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.

  1. Download SFCFix.exe (by niemiro) and save this to your Desktop. If you still have this on your desktop from downloading previously, you don't need to re-download.
  2. Download the file below, SFCFix.zip, and save this to your Desktop. Ensure that this file is named SFCFix.zip - do not rename it.
  3. Save any open documents and close all open windows.
  4. On your Desktop, you should see two files: SFCFix.exe and SFCFix.zip.
  5. Drag the file SFCFix.zip onto the file SFCFix.exe and release it.
  6. SFCFix will now process the script.
  7. Upon completion, a file should be created on your Desktop: SFCFix.txt.
  8. Copy (Ctrl+C) and Paste (Ctrl+V) the contents of this file into your next post for me to analyse please

Step#2 - SFC Scan
1. Right-click on the Start
w8start.png
button and select Command Prompt (Admin)
2. When command prompt opens, Copy (Ctrl+C) and Paste (Right-click > Paste) the following command into it, then press Enter
sfc /scannow

3. Once it finishes, copy and paste the following into the command-prompt window and press Enter.
copy %windir%\logs\cbs\cbs.log "%userprofile%\Desktop\cbs.txt"

4. Once this has completed please go to your Desktop and you will find CBS.txt => Right-click on this file and choose Send To...Compressed (zipped folder). Please upload this zipped file CBS.zip to this thread

Please Note:: if the file is too big to upload to your next post please upload via a service such as Dropbox or One Drive or SendSpace and just provide the link.


Items for your next post
1. SFCFix.txt
2. CBS.txt
 

Attachments

Hi Brian,

Thanks again, for the fantastic work that you do throughout this site; a very kind use of your time.

so..

Looks good, SFCfix.exe wise:


SFCFix version 3.0.0.0 by niemiro.
Start time: 2016-05-26 17:02:49.743
Microsoft Windows 10 Build 10586 - amd64
Using .zip script file at C:\Users\Trance4Mason\Desktop\SFCFix.zip [0]

PowerCopy::
Successfully took permissions for file or folder C:\WINDOWS\Winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_10.0.10586.0_none_e5c6f8fa482369ff\mscoree.dll


Successfully copied file C:\Users\Trance4Mason\AppData\Local\niemiro\Archive\Winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_10.0.10586.0_none_e5c6f8fa482369ff\mscoree.dll to C:\WINDOWS\Winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_10.0.10586.0_none_e5c6f8fa482369ff\mscoree.dll.


Successfully restored ownership for C:\WINDOWS\Winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_10.0.10586.0_none_e5c6f8fa482369ff\mscoree.dll
Successfully restored permissions on C:\WINDOWS\Winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_10.0.10586.0_none_e5c6f8fa482369ff\mscoree.dll
PowerCopy:: directive completed successfully.


Successfully processed all directives.
SFCFix version 3.0.0.0 by niemiro has completed.
Currently storing 1 datablocks.
Finish time: 2016-05-26 17:02:50.826
Script hash: 1G3xV6oYl8M9XFSq0/FS8Mj37tMlsC2Xu3+rTESZku4=
----------------------EOF-----------------------



CBS.zip attached as requested.

SFC finished with a 'found and repaired' status, so I took a quick peek:

You'll see I still have a lot of shared ownership warnings, which would be better off protected from my meddling little fingers and other potential malware which might try and exploit such permission loopholes. I'm guessing that icacls can take care of these in one swoop, with the right command string?

I'm not sure how healthy this leaves my various .NET frameworks yet, a couple of apps still give me runtime errors, even after re-installing them, whilst another app doesn't give me any error regarding a specific .NET version installed, any more, and thus is fine.

I fear that whilst SFC (or rather SFCfix.exe) may have repaired my corrupted files, (yay!) I might still be playing the ".NET Framework multi-version" puzzle game. (Not so yay).

Alas, you are the expert, and I bow to your superior knowledge...

Regards,

Clive
 
The duplicate ownership messages are expected and OK. So the file is repaired. Now please do the following.

Step#1 - DISM /RestoreHealth Scan
Warning:this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.

  1. Right-click on the Start
    w8start.png
    button and select Command Prompt (Admin)
  2. When command prompt opens, Copy (Ctrl+C) and Paste (Right-click > Paste) the following command into it, then press Enter
    Dism /Online /Cleanup-Image /RestoreHealth
  3. Once it finishes, copy and paste the following into the command-prompt window and press Enter. If prompted to overwrite the existing file go ahead.
    copy %windir%\logs\cbs\cbs.log "%userprofile%\Desktop\cbs.txt"
  4. Once this has completed please go to your Desktop and you will find CBS.txt => Please zip/upload to this thread.
    Please Note:: if the file is too big (over 7MB) to upload to your next post, please upload via a service such as Dropbox or One Drive or SendSpace and just provide the link.
 
Handbrake, the popular video transcoder HandBrake: Open Source Video Transcoder

Throws 2 errors when attempting to launch: attached and numbered in order of appearance.

A quick look over the Handbrake forums, I've seen a few users with .NET issues:

Handbrake wont start windows 1 - HandBrake

fresh install crashes on opening - HandBrake

I'm completely lost when it comes to Microsoft's strategy re .NET Framework versions/installs, now that it is part of Windows 10 itself. The structure is peculiar to me, with regards to older versions remaining on the system for compatibility somehow? Yet the installer for v4.5 and above, (which blocks installation) states that it is an "in-place" update, not needing any previous versions?

I've never experienced any problem like this before, where I have completely no idea what's going on. (except the painful/scary Win10 update process!) I'm starting to feel old :( lol
 

Attachments

  • handbrake1.png
    handbrake1.png
    32.6 KB · Views: 3
  • handbrake2.png
    handbrake2.png
    59.5 KB · Views: 2
I think an in-place upgrade of Windows 10 should correct your issue. No documents/programs will be lost in the process.

1. Download the Media Creation Tool and save this to your desktop. Go ahead and run this as well. Note: Click the Download tool now button when you get to this link.
2. Accept the License Agreement
3. Keep the default Upgrade this PC option and click Next.
4. Let this process complete the upgrade to the newest build and let me know when complete.
 
Hi Brian,

I'm extremely happy to report that the system is now 100% stable again!
:dance:

I honestly can't thank you enough*, for all your fantastic help and support, and the effort that you (and the team) put into this amazing forum.

I'd researched the windows 10 reset/re-install features prior to joining, but I didn't know/hadn't seen anywhere, that keeping all existing apps was an option.

Had I known this was possible, I would have given it a try for sure, before posting my woes on here. I'm not sure whether it would have resolved everything on it's own of course, but if so, I can't believe that I didn't find this solution mentioned anywhere on the Microsoft / Technet forums. Alas, I also would not have become a member here though, so i'll take that, as a silver lining.

Regardless, you are a lifesaver, and I am eternally grateful to you, for that.

If you ever need any form of media designing, changing, editing, whatever, just give me a nod...

Thank you so much,

Clive


*Don't worry - I can see the donate button ;)
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top