Windows Update Troubleshooting

Posted on in category «Tech» by fnv with tags ,

Windows Update Troubleshooting

Useful commands

Run the command line (cmd) utility with the administrator rights.

# Stop/Start Windows Update Service and cleanup already downloaded files
net stop wuauserv
ren c:\windows\SoftwareDistribution c:\windows\SoftwareDistribution.old
net start wuauserv

# File integrity checker
sfc /scannow

# Get available packages in the local image
dism /online /get-packages

# Scan for local image health 
dism /online /cleanup-image /scanhealth

# Extract cab file from *.msu file
exctract -F:* <Package.msu> <path_where_to_extract>

# Install the cab file
dism /online /add-package /packagepath:<full_path_to_cab_file>

# Parse CBS log file
findstr /C:"[SR]" %windir%\logs\cbs\cbs.log >sfcdetails.txt
findstr /I "error fail warn" %windir%\logs\cbs\cbs.log >cbs_issues.txt

Log files

c:\Windows\WindowsUpdate.log
c:\Windows\Logs\CBS\CBS.log
c:\Windows\Logs\CBS\CheckSUR.log
c:\Windows\Logs\DISM\dism.log

Tricks

  • try to install latest SSU (Servicing Stack Update)
  • try to install latest Windows Update Troubleshooter
  • try to download the package from Windows Update Catalog and install it manually
  • installing the package automatically or manually always produces big CBS.log file, try to use dism for more accurate logs without "other mess"
  • don't be afraid to remove older package if it is corrupted
  • it could be tricky (search and search and search in the logs) to find appropriate package which contains corrupted file
  • dism cannot work with *.msu file, extract the cab file first

Real case

The monthly windows update rollup (2019-05) failed to install on Windows 7 machine. I tried to delete cached files, install latest SSU, install latest Windows Update Troubleshooter, install the package manually - nothing. During that I tried to of course check the CBS log but due size of produced file (50 - 180MB!) it was more or less impossible to find anything useful.
Later on I tried to work with dism tool which produces more accurate logs without the mess around. CBS log file size was around 8MB in my case.
CBS log file contains lines stated that the file Msspellcheckingfacility.exe cannot be found (ERROR_FILE_NOT_FOUND, 0x80070002). I identified the package which should contain the missing file and search over the logs to find more details. The package was part of another monthly rollup (2018-10). I decided to uninstall the package, restarted the computer and tried to install failing package. Aaaaaand, it was successful!

Links

https://www.catalog.update.microsoft.com/Home.aspx https://support.microsoft.com/en-us/help/4027322/windows-update-troubleshooter