Fix Windows 7 update installation errors

  • Tutorial
Windows 7 is still a popular operating system in a corporate environment, despite the fact that two new versions of client operating systems have already been released. Enhanced support for the “seven” will end only on January 14, 2020, which means that the next 4 years, updates will be released for it that fix the discovered vulnerabilities.

There is a rule - if there are updates, then there are problems with installing them. Let's see what the main problems are when updating Windows 7 through Windows Server Update Services (WSUS) and how to fix them at the lowest cost.



Error # 1 . Failed to find updates with error code 80244010

You are almost guaranteed to see this error on any system that first accesses the WSUS server. In WindowsUpdate.log, you will also see a warning: The reason for the problem is that the list of updates has become too large and the client cannot take it in one go. Details - blogs.technet.microsoft.com/sus/2008/09/18/wsus-clients-fail-with-warning-syncserverupdatesinternal-failed-0x80244010 What solution does Microsoft offer? If, after an error, a new search for updates is started, the metadata download process will continue from the moment the error occurs. Patience gentlemen, patience. Three, five attempts - and everything will be fine. Do not forget to wait until the end of the previous search cycle when searching again, otherwise the magic will not work!
WARNING: Exceeded max server round trips


wuauclt /detectnow

Error # 2. Windows updates are not installed with error 0x80070308

It occurs sporadically, and in one case out of 100 she has the only and very specific solution - to remove the Reboot key . It is important not to overdo it, you should not delete any other keys in this section, even if you really do not like them, because after this update they will cease to be installed forever.
HKLM\Components\PendingRequired=1



Error # 3. All other errors

Almost 100% of other errors can be solved by the System Update Readiness Tool (SURT) from the article support.microsoft.com/en-us/kb/947821
Download the package for your system, install, read the log %windir%\Logs\CBS\CheckSUR.log and if it ends something like this:
Summary:
Seconds executed: 1164
Found 16 errors
Fixed 4 errors

then you are our customer.

The problem is that during the installation of updates, broken files may appear on the system. What is the cause - a faulty network, disk, RAM, Windows Update itself - cannot be found out, and it will be necessary to fix the errors for installing subsequent updates.

As a rule, * .cat, * .mum, * .manifest files are damaged. Someone gets damaged * .dll, but I have not come across in practice. And it seems that the SURT tool should itself fix the errors, because inside it there is a huge catalog of reference files. Only for the last time, SURT was updated in October 2014, and innumerable patches on the operating system have since been released, and many files in the directory are missing.



Below I will describe the sequence of steps required to fix errors installing updates on Windows 7 x64 using SURT. For the x86 edition, you just need another SURT package from KB947821.

The sequence of actions will be as follows.

1. Run the first pass of Windows6.1-KB947821-v34-x64.msu

The user will not need to distract from work, we will do everything remotely. Create the following batch file and run it:
set machine=BUHWKS02
xcopy Windows6.1-KB947821-v34-x64.msu \\%machine%\admin$\temp
psexec -s \\%machine% wusa "c:\windows\temp\Windows6.1-KB947821-v34-x64.msu" /quiet /norestart
pause

where BUHWKS02 is the target machine.
When the script runs and pauses, we check. %windir%\Logs\CBS\CheckSUR.log
If no errors are found, the point is not in broken updates.
If it ends
Summary:
Seconds executed: 1164
Found 16 errors
Fixed 4 errors

CSI Manifest All Zeros Total count: 6
CSI Catalog Corrupt Total count: 3
Fixed: CSI Catalog Corrupt. Total count: 3
CBS MUM Corrupt Total count: 3
CBS Catalog Corrupt Total count: 3
CSI Catalog Thumbprint Invalid Total count: 1
Fixed: CSI Catalog Thumbprint Invalid. Total count: 1
Unavailable repair files is:
winsxs \ manifests \ wow64_microsoft-windows-gdi32_31bf3856ad364e35_6.1.7601.19091_none_c19fa2719495aca9.manifest
winsxs \ manifests \ amd64_microsoft-windows-CAPI2-weakcrypto_31bf3856ad364e35_6.1.7601.23290_none_5e936c9c5ce2e8e6.manifest
winsxs \ manifests \ wow64_microsoft-windows-gdi32_31bf3856ad364e35_6.1.7601.23290_none_c22840d8adb43043.manifest
winsxs \ manifests \ amd64_microsoft-windows-gdi32_31bf3856ad364e35_6.1.7601.19091_none_b74af81f6034eaae.manifest
winsxs \ manifests \ amd64_microsoft-windows-CAPI2-weakcrypto_31bf3856ad364e35_6.1.7601.19091_none_5e0ace3543c4654c.manifest
winsxs \ manifests \ amd64_microsoft-windows-gdi32_31bf3856ad364e35_6.1.7601.23290_none_b7d3968679536e48.manifest
servicing \-packages \ Package_2_for_KB3123479 31bf3856ad364e35 ~ ~ amd64 ~~ 6.1.1.0.mum
servicing \-packages \ Package_2_for_KB3123479 31bf3856ad364e35 ~ ~ amd64 ~~ 6.1.1.0.mum
servicing \-packages \ Package_for_KB3123479_SP1 ~ 31bf3856ad364e35 ~ amd64 ~~ 6.1.1.0.mum

then we will fix it.

2. Copy the reference files to the target machine

Microsoft offers us a long, confusing procedure with extracting good files from updates and placing them in certain directories of the SURT tool. At the same time, the paths in the articles are incorrect. Somewhere, they generally recommend attaching the original msu files.

The simplest and most correct option is to copy the reference files from the working system:

* .mum and * .cat from C: \ Windows \ servicing \ Packages add up to% windir% \ Temp \ CheckSUR \ servicing \ packages
* .manifest from C: \ Windows \ winsxs \ Manifests add up to% windir% \ Temp \ CheckSUR \ winsxs \ manifests \

The problem is that there are usually dozens of broken files and it is very difficult to select and copy them. Then the following PowerShell script comes to the rescue (the machine you are running the script from is considered the reference)

cls
$flag = $false
$destPC = "\\BUHWKS02"
$log=get-content $($destPC + "\admin$\Logs\CBS\CheckSUR.log")
$MUMCATSource = "C:\Windows\servicing\Packages\"
$MUMCATDest = $destpc + "\admin$\Temp\CheckSUR\servicing\Packages\"
$MANIFESTSource = "C:\Windows\winsxs\Manifests\"
$MANIFESTDest = $destpc + "\admin$\Temp\CheckSUR\winsxs\Manifests\"
If ((Test-Path -Path $MUMCATDest -PathType Container) -eq $false) {New-Item -Path $MUMCATDest -ItemType directory }
If ((Test-Path -Path $MANIFESTDest -PathType Container) -eq $false) {New-Item -Path $MANIFESTDest -ItemType directory}
foreach ($line in $log) {  
    if ($flag -eq $True){
        if ($line.trim().Length -ne 0) {        
            $fileArray=$($line.Split("\"))
            $file = $FileArray[$FileArray.Length-1]
            $extArray = $file.split(".")
            $ext = $extArray[$extArray.length-1]
            if ($ext -eq "manifest") {
                Write-Warning $("Copying " + $($MANIFESTSource+$file)+" to " + $MANIFESTDest)
                Copy-Item $($MANIFESTSource+$file) $($MANIFESTDest+$file)
            }
            if (($ext -eq "mum") -or ($ext -eq "cat") ) {
                Write-Warning $("Copying " + $($MUMCATSource+$file)+" to " + $MUMCATDest)
                Copy-Item $($MUMCATSource+$file) $($MUMCATDest+$file)
            }
        }
    }
    if ($line -eq "Unavailable repair files:") {$flag = $true}    
} 

As you can see, the script is simple and can be easily sharpened with a file for your infrastructure.

3. We launch the second pass of Windows6.1-KB947821-v34-x64.msu

After copying the files, we restart SURT using the batch file from the first step. When you restart, the tool will be able to pick up the reference files copied by us from% windir% \ Temp \ CheckSUR and replace the damaged ones with them.
If we did everything correctly, then% windir% \ Logs \ CBS \ CheckSUR.log will take the following form:
===================================
Checking System Update Readiness.
Binary Version 6.1.7601.22471
Package Version 26.0
2016-03-03 09:15
Checking Windows Servicing Packages
Checking Package Manifests and Catalogs
Checking Package Watchlist
Checking Component Watchlist
Checking Packages
Checking Component Store
Summary:
Seconds executed: 1435
No errors detected


Now you can continue to install updates on the target machine, for example, with the following batch files:
set machine= BUHWKS02
psexec -i -s \\%machine% wuauclt /detectnow
pause

set machine= BUHWKS02
psexec -i -s \\%machine% wuauclt /updatenow
pause

Error # 4. If SURT worked fine, but updates are still not delivered

Try to resort to the old trick - reset the Windows Update service to its original state. To do this, delete the% windir% \ SoftwareDistribution directory.

We create the WU-cleanupCMD.cmd file: Run: After this, Error # 1 will occur, but we already know how to deal with it.
net stop wuauserv
rmdir /s /q %windir%\SoftwareDistribution
net start wuauserv
wuauclt /detectnow


set machine= BUHWKS02
psexec -c -s \\%machine% WU-cleanupCMD.cmd
pause



Error # 5


The client disappears from the WSUS console. A curious error related to the incorrect cloning of machines and the duplication (zating, etc.) of customer identifiers. It is solved as follows:

net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIdValidation /f
net start wuauserv
wuauclt /resetauthorization /detectnow /reportnow


Error # 6

GetCookie failure, error = 0x8024400D, soap client error = 7, soap error code = 300, HTTP status code = 200
SyncUpdates failure, error = 0x80072EE2, soap client error = 5, soap error code = 0, HTTP status code = 200
Windows Update Client failed to detect with error 0x80072ee2


The error is due to a lack of resources in AppPool WSUS. The solution is to remove the limit on memory consumption. How to do this is an article .
Summary: Open IIS, Application Pools, WsusPool, Advanced Settings.
The Private Memory Limit parameter is set to 0. The

continuation of the WSUS configuration topic is in my next article: https://habrahabr.ru/post/329440/

PS:
Many errors were resolved in the new WSUS client:
1. KB3125574 “Windows 7 post SP1 Convenience Rollup Update . " Read the Known issues section carefully!

You must first install KB3020369, “April 2015 servicing stack update for Windows 7 and Windows Server 2008 R2.”

Have a good administration!

Also popular now: