At some point in the lifetime of my PC Desktop system I got two bluescreens in a row while playing video games. Following that I managed to stop the system from crashing by rewireing all hardware but for some reason any Windows updates that affected the System like the annual upgrade from 1803 to 1903 and a random update of the .NET framework to 4.8 for the 1803 version of windows kept failing to install. As they were not mandatory though I did pay them no mind as regular security updates to windows defender did still work. At some point I ran the Windows Update Troubleshooter that said they found some errors but a restart would run a fixing routine.
At some point I decided to get the updates to work again. The update failures were 0x8000ffff for the .NET update and 0x800700C12 for the Windows upgrade.
Searching for them you find a load of crap online as we all know that any and all windows errors are the perfect place to get vulnerable people to install malware.
Downloading the MediaCreationTool and telling it to do a manual upgrade to 1903 also failed with a "critical error" though it seemed nothing affected the system and it simply did not apply any changes. No logs though (THANKS MICROSOFT FOR THESE HELPFULL ERROR MESSAGES)
Dumping the Windows Update Log via the powershell command GetWindowsUpdateLog resulted in me finding out ... not much. Reading these error logs is tedious and complicated and the differentiation between errors and failiures as well as simply the fact that there are systems involved you will never have heared of during normal operation (at least in Linux you know what systems you use and install when setting up the system) did not help.
I then tried to do a manual installation of the .NET 4.8 Framework. It also failed from the normal installer but at least it dumped a searchable .xml in some random location of my drives (It for some reason dumped the install files into my slow 2TB storage HDD instead of somewhere on the SSD the system was installed in for example. But hey! Windows and temp files! What could go wrong if the temp files are never cleaned up?). So looking into that it came to my attention that some command line program executed during the final steps of installation failed and returned with the same 0x8000ffff error code: wusa.exe
Comparing error messages at least that is a common error during installation: The finalization part failes.
Looking into ways to fix windows update I found advice in trying to use:
sfc /scannow
and
dism.exe /online /cleanup-image /restorehealth
sfc failed with the information that there are still changes to the system pending and that I should restart the PC. I did that for the past 6 months every day so that could not be the solution.
dism.exe failed at around 82.6% and at least gave me the hint that there are logs to find to look into. Even though they were also not very helpful in their format it also failed at some finalization step.
Looking into how to get sfc to work again I found a random forum post telling the user to delete the pending.xml in the WinSxS directory. Looking into that directory (for whatever it is used) I found the pending.xml - being almost 300MB big. Something doesn't seem right.
Deleting the file as an administrator does not work. I keep getting access denied errors. Even downloading the PSTools and opening the power shell as the SYSTEM user denies me rights to delete it. There are no processes holding a handle to the file.
How do I fix this mess and how are all these errors linked?