During the lifespan of my desktop computer, I encountered two consecutive bluescreens while playing video games. I managed to prevent further crashes by rewiring the hardware, but Windows updates that affected the system, such as the annual upgrade from version 1803 to 1903 and a random update of the .NET framework to version 4.8 for the 1803 version of Windows, continued to fail to install. As these updates were not mandatory, I ignored them, as regular security updates to Windows Defender continued to work. Eventually, I ran the Windows Update Troubleshooter, which identified errors that could be fixed with a restart.
Later, I decided to tackle the update issues. The error codes were 0x8000ffff for the .NET update and 0x800700C12 for the Windows upgrade. I searched online for solutions but encountered a lot of unreliable information. I attempted to manually upgrade to version 1903 using the MediaCreationTool, but it failed with a “critical error,” and there were no helpful logs available. I tried using the PowerShell command “GetWindowsUpdateLog” to access the Windows Update Log but found it challenging to interpret the information.
I then attempted to manually install the .NET 4.8 Framework, but it also failed, and the installation files were dumped in a random location on my 2TB storage HDD instead of the SSD where the system was installed. After investigating, I discovered that a command-line program, “wusa.exe,” failed during the final steps of installation, resulting in the 0x8000ffff error code. This error message is a common issue during installation.
After researching ways to fix the Windows update problems, I came across advice suggesting that I try:
sfc /scannow
and
dism.exe /online /cleanup-image /restorehealth
I tried using sfc, but it failed and suggested that I restart my PC because there were still pending changes to the system. However, restarting the computer every day for the past six months did not resolve the issue. Then I tried using dism.exe, which failed at around 82.6%. The logs generated were not helpful, and the error occurred during the finalization step.
While searching for a solution to make sfc work, I stumbled upon a forum post suggesting that I delete the pending.xml file located in the WinSxS directory. When I checked the directory, I found the file to be nearly 300MB in size, which seemed abnormal. Unfortunately, I couldn’t delete the file even as an administrator, and attempting to access it as the SYSTEM user via PSTools also failed. There were no processes holding onto the file.
I’m unsure how to fix this issue, and I don’t know if these errors are related to each other.
2 Answers
Introduction
Windows updates are essential for the smooth functioning of your computer system. They contain security patches, bug fixes, and performance improvements that are necessary for optimal performance. However, at times, you may encounter issues while installing these updates. In this blog post, we will discuss some common problems related to Windows updates and how to fix them.
Windows Update Error Codes
Windows updates may fail to install due to various reasons, and the error codes can help you identify the problem. Some common error codes are:
- 0x8000ffff
- 0x800700C12
- 0x80240034
- 0x8024402C
- 0x80246007
0x8000ffff
This error code usually occurs when there are issues with the Windows Update components. You can try resetting the components by following these steps:
- Open Command Prompt as an administrator.
- Type the following commands and press Enter after each:
- net stop wuauserv
- net stop cryptSvc
- net stop bits
- net stop msiserver
- Type the following commands to rename the Software Distribution Folder and the Catroot2 folder:
- ren C:WindowsSoftwareDistribution SoftwareDistribution.old
- ren C:WindowsSystem32catroot2 Catroot2.old
- Type the following commands to restart the services:
- net start wuauserv
- net start cryptSvc
- net start bits
- net start msiserver
- Restart your computer and try installing the updates again.
0x800700C12
This error code usually occurs when there are issues with the Windows Update database. You can try resetting the database by following these steps:
- Open Command Prompt as an administrator.
- Type the following commands and press Enter after each:
- net stop wuauserv
- net stop cryptSvc
- net stop bits
- net stop msiserver
- Type the following commands to rename the Software Distribution Folder and the Catroot2 folder:
- ren C:WindowsSoftwareDistribution SoftwareDistribution.old
- ren C:WindowsSystem32catroot2 Catroot2.old
- Type the following command to re-register the Windows Update components:
- regsvr32.exe /s atl.dll
- regsvr32.exe /s urlmon.dll
- regsvr32.exe /s mshtml.dll
- regsvr32.exe /s shdocvw.dll
- regsvr32.exe /s browseui.dll
- regsvr32.exe /s jscript.dll
- regsvr32.exe /s vbscript.dll
- regsvr32.exe /s scrrun.dll
- regsvr32.exe /s msxml.dll
- regsvr32.exe /s msxml3.dll
- regsvr32.exe /s msxml6.dll
- regsvr32.exe /s actxprxy.dll
- regsvr32.exe /s softpub.dll
- regsvr32.exe /s wintrust.dll
- regsvr32.exe /s dssenh.dll
- regsvr32.exe /s rsaenh.dll
- regsvr32.exe /s gpkcsp.dll
- regsvr32.exe /s sccbase.dll
- regsvr32.exe /s slbcsp.dll
- regsvr32.exe /s cryptdlg.dll
- regsvr32.exe /s oleaut32.dll
- regsvr32.exe /s ole32.dll
- regsvr32.exe /s shell32.dll
- regsvr32.exe /s initpki.dll
- regsvr32.exe /s wuapi.dll
- regsvr32.exe /s wuaueng.dll
- regsvr32.exe /s wuaueng1.dll
- regsvr32.exe /s wucltui.dll
- regsvr32.exe /s wups.dll
- regsvr32.exe /s wups2.dll
- regsvr32.exe /s wuweb.dll
- regsvr32.exe /s qmgr.dll
- regsvr32.exe /s qmgrprxy.dll
- regsvr32.exe /s wuauclt.exe
- Type the following commands to restart the services:
- net start wuauserv
- net start cryptSvc
- net start bits
- net start msiserver
- Restart your computer and try installing the updates again.
SFC and DISM Commands
SFC (System File Checker) and DISM (Deployment Image Servicing and Management) are two commands that can help fix issues related to system files and components. However, they may not always be effective in fixing Windows update problems.
The SFC command scans the system files and replaces the corrupted or missing files with a cached copy. To run the SFC command, follow these steps:
- Open Command Prompt as an administrator.
- Type the following command and press Enter:
- sfc /scannow
- Wait for the scan to complete and restart your computer.
The DISM command is used to repair the Windows image and can fix issues related to Windows updates. To run the DISM command, follow these steps:
- Open Command Prompt as an administrator.
- Type the following command and press Enter:
- Dism /Online /Cleanup-Image /CheckHealth
- If the command detects any issues, type the following command and press Enter:
- Dism /Online /Cleanup-Image /RestoreHealth
- Wait for the command to complete and restart your computer.
Windows Update Troubleshooter
The Windows Update Troubleshooter is a built-in tool that can help identify and fix issues related to Windows updates. To run the troubleshooter, follow these steps:
- Open Settings and click on Update & Security.
- Click on Troubleshoot.
- Click on Additional troubleshooters.
- Click on Windows Update and click on Run the troubleshooter.
- Follow the on-screen instructions and restart your computer.
Conclusion
Windows updates are important for the smooth functioning of your computer system. If you encounter issues while installing updates, you can try the methods mentioned in this blog post to fix them. If the issue persists, you may need to contact Microsoft support for further assistance.
I was dealing with a complicated issue on my computer. It all started with a blue screen while I was playing video games, and I noticed that Windows update was installing something in the background. After that, my system reported that the boot script was corrupted, and I had to run some command line tools from the advanced boot menu to fix it.
I also had to rewire everything because the error logs told me that something weird happened while writing to the disk. I thought that the wire connection to the system SSD was cut while the system was running. After fixing that, the system ran smoothly, but the updates didn’t work anymore.
It turned out that the file corruption was deeper than I initially thought. I found out that the pending.xml file, which contained a list of updates that should be applied when the PC restarted, was broken. This prevented Windows from reading the contents successfully, but it still allowed it to add to the broken file all updates it thought it should apply. This led to the file bloating up to almost a gigabyte in size.
Even the stand-alone installers and manual upgrades with the media creation tool failed to parse and add to the pending.xml correctly. As a result, the ComponentBasedServicing seemed to be responsible for some programs, which caused CBS to appear in error log files.
To solve the issue, I had to boot into troubleshoot mode from an USB stick I created with the media creation tool. From there, I manually deleted the pending.xml in the WinSxS directory. Then, I ran an sfc /scannow, which reported that some files were corrupted and some stuff was fixed, but not all.
Next, I ran a dism /online /cleanup-image /restorehealth, which failed to find a source to clean up from. I then ran a dism /online /cleanup-image /startcomponentcleanup to clean up the component service. After that, I ran another /restorehalth to success. Finally, I reset the Windows Update Cache and had it redownload all pending updates and upgrades.
It was a hellish search for a solution, and I wish that Windows would provide clearer information about what is or is not broken in the system when anything goes wrong. However, in the end, I managed to get everything working again.