A very common site i'm seeing with windows 7 upgrades, is upon restarting you get the message
Setu phas detected that the .NET Framework version 4 needs to be repaired. Do not restart your computer until Setup is complete.
it can take sometime to finish around 10-15 minutes at the most but if something goes wrong you can be stuck in an endless loop of windows updates.
the example is of a KB982671 update that trying to install every 30 minutes because .net framework was corrupt in some way and an update was impossible
The solution is as follows
Download the Microsoft .NET framework cleanup tool from
http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-90-44-93/dotnetfx_5F00_cleanup_5F00_tool.zip
Use it to clean all versions of .NET framework
now download the full standalone version of the version of .NET framework that you need. I REPEAT Full Standalone
from
http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe
the internet installer version failed for me, and kept giving me the message that another program was already installing .net framework, which of course was the microsoft windows update stuck in a loop
that should be it, worked for me after I got impatient with the repair and just crashed it, best bet is just to let it go and finish its job