Discovered a fun little problem while working on an alleged hard drive failure, thought I would share:
When a computer running Windows Vista or 7 crashes with hard-drive failure (in this particular case due to a virus), the first step in the recovery console or in a system restore is to unregister the .NET 2.0 Framework. Apparently, it’s a feature that is supposed to prevent .NET-enabled viral code from using the existing libraries. However, the unregister is faulty in the Vista/7 recovery console and trashes the mscorlibs dll, or at least damages it. When the dll is re-registered, it’s in a broken state. Anything that depends on the 2.0 libraries, then, will fail to work. This includes Visual Studio 2008/2010, MS Powerpoint 2010, advanced parts of MS Word 2010 and MS Excel 2010 (such as data-driven pivot tables) and SQL Server 2008. What you see is a window stating that mscorlibs.dll or one of its dependencies failed to load.
Fun.
As 2.0 and 3.5 are embedded in Windows 7 (and removing them would toast the OS entirely), it’s not possible to reinstall them directly. Repair won’t work either, since the problem is that the OS thinks the damaged version of the dll is actually correct.
Solution:
Click Start/All Programs/Accessories, right click on Command prompt and select “Run as Administrator”
At the command prompt type sfc /scannow
Wait about 20 minutes for the scan to complete.
You should see either that all problems are fixed or that the scan didn’t find anything to do (this is actually a flaw in the reporting; it did find and correct the problem).
Reboot the computer. Everything should be working now.
For additional steps should the SFC fail, consult Jedi Master Aaron Stebner
http://blogs.msdn.com/b/astebner/arc...ows-vista.aspx



