jberezanski / ChocolateyPackages

Chocolatey packages maintained by me
MIT License
86 stars 52 forks source link

kb3035131 - Fails on Server 2012 - Downloads and attemps to install the wrong update #62

Closed laurinkeithdavis closed 5 years ago

laurinkeithdavis commented 5 years ago

On Server 2012 (both the original and R2), this attempts to download and install "Windows8.1-KB3035131-x64.msu", which fails:

image

KB3035131 v1.0.2 [Approved] kb3035131 package files upgrade completed. Performing other installation steps. Downloading KB3035131 64 bit from 'https://download.microsoft.com/download/B/2/4/B24FB08A-DEA8-4B4C-8EE4-B9 F0FB180200/Windows8.1-KB3035131-x64.msu' Progress: 100% - Completed download of 'Windows8.1-KB3035131-x64.msu' (4.52 MB). Progress: 100% - Completed download of 'Windows8.1-KB3035131-x64.msu' (4.52 MB).

Download of 'Windows8.1-KB3035131-x64.msu' (4.52 MB) completed. Virus check: 0/57 scan engines flagged this assembly. Due to possible false positives we fail at 4 minimum positives. Virus scan engines indicate this file is probably safe. For details see https://www.virustotal.com/file/a9d6f7b519ad3a22abde3af7ce3ebb90ff84a028ede215 4ac5d0548c88ccfedd/analysis/ Hashes match. Installing Windows8.1-KB3035131-x64.msu... ERROR: Running ['C:\Windows\System32\wusa.exe' "C:\Users\keithdavis\AppData\Local\Temp\ 2\chocolatey\KB3035131\1.0.2\Windows8.1-KB3035131-x64.msu" /quiet /norestart /lo g:"C:\Users\keithdavis\AppData\Local\Temp\2\chocolatey\KB3035131.Install.evt"] w as not successful. Exit code was '-2145124329' See log for possible error messages.. The upgrade of kb3035131 was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\KB3035131\Tools\ChocolateyIns tall.ps1'. See log for details.

jberezanski commented 5 years ago

Could you attach the entire chocolatey.log from Server 2012? The data in the package looks fine:

    '6.2-server' = @{
        Url64 = 'https://download.microsoft.com/download/4/7/6/47682024-8C3B-4D81-B019-24E34EAC3ABA/Windows8-RT-KB3035131-x64.msu'
        Checksum64 = '22CBF7E733C55C4F90DFA0864AE8B61F07E522825DE7DDD94439FF4D1F4D2766'
    }
jberezanski commented 5 years ago

The KB3035131.Install.evt log file mentioned in the output might also be helpful.

laurinkeithdavis commented 5 years ago

I don't know what you mean. This package will not run on Server 2012 (R2 or original):

https://download.microsoft.com/download/4/7/6/47682024-8C3B-4D81-B019-24E34EAC3ABA/Windows8-RT-KB3035131-x64.msu

I've tried it manually, hence the screenshot above.

jberezanski commented 5 years ago

Server 2012 = Windows 8 = OS version 6.2. Server 2012 R2 = Windows 8.1 = OS version 6.3.

https://download.microsoft.com/download/4/7/6/47682024-8C3B-4D81-B019-24E34EAC3ABA/Windows8-RT-KB3035131-x64.msu is the package published by Microsoft for Windows 8/Server 2012 (not R2). If it fails to install, then probably another prerequisite KB is missing.

What image do you install the OS (2012) from? Does it have any updates installed?

jberezanski commented 5 years ago

The easiest way to list all updates installed on the machine is to use the Get-Hotfix command in PowerShell (with admin rights).

jberezanski commented 5 years ago

If it fails to install, then probably another prerequisite KB is missing.

...or a later update supersedes this one.

Anyway, I need the list of installed updates on the machine to diagnose this further.

laurinkeithdavis commented 5 years ago

What image do you install the OS (2012) from? Does it have any updates installed?

All are OEM DVD Server 2012 Standard (4 are R2 and 1 is non-R2). All are current with all Security, Critical, and Quality WSUS updates, but no special "hotfix" updates (that I'm aware of).

Server 2012 = Windows 8 = OS version 6.2. Server 2012 R2 = Windows 8.1 = OS version 6.3.

Yes, I'm aware, I'm just telling what happens. I even just tested this again, by downloading the file indicated on this page (for one of the R2 servers).

https://support.microsoft.com/en-us/help/3035131/ms15-025-description-of-the-security-update-for-windows-kernel-march-1

Same result, update not applicable.

Here are the results from Get-Hotfix for one of the 2012 R2 servers:

updates.txt

Here are the results from Get-Hotfix for the 2012 server:

updates.txt

Here is the EVT file as well (from 2012 R2).

KB3035131.Install.evt.zip

Let me know what else I can do to assist.

jberezanski commented 5 years ago

Thanks for the logs.

All are current with all Security, Critical, and Quality WSUS updates

So I guess one of the already installed updates supersedes KB3035131. However, the install logic invoked by the package should handle this without raising an error (which is what happened when I tested this on a freshly installed and fully updated 2012: console.txt chocolatey.log ).

Unless…

I wonder what version of chocolatey-windowsupdate.extension was used when you tried to install this KB via choco. Could you please provide the output of clist -lo and attach C:\ProgramData\Chocolatey\logs\chocolatey.log so that I can review the diagnostic info logged by the package install script?

jberezanski commented 5 years ago

OK, never mind my last request, I think I figured it out. In your first post I noticed the mention of VirusTotal, so I presume you are using licensed Chocolatey (and you have chocolatey.extension installed). It turns out there is a slight difference in behavior between the licensed and free versions, which prevents my install script from seeing the actual error code returned by wusa.exe. As a consequence, the package is unable to intercept the "update not applicable" error condition and convert it into a successful package install result. I should have a fix shortly.

jberezanski commented 5 years ago

https://chocolatey.org/packages/KB3035131/1.0.3 https://chocolatey.org/packages/chocolatey-windowsupdate.extension/1.0.4

until they pass moderation:

cinst -y chocolatey-windowsupdate.extension --version 1.0.4
cinst -y KB3035131 --version 1.0.3
laurinkeithdavis commented 5 years ago

Already approved by the time I was ready to test. Both installed just fine.

Upgraded:

jberezanski commented 5 years ago

Can we close this issue then?

laurinkeithdavis commented 5 years ago

Yes.