This project has moved. For the latest updates, please go here.

Problem to deploy custom update on windows server 2012R2

Topics: Publishing Issue
Mar 22, 2016 at 3:05 PM
Hello,

I try to published a custom update on windows server 2012R2 64 bits. But having error 80131700 on the windows update.
On the wsus server (win2012R2 too), I've install the last version of WSUS package publisher (v1.3.1511.15).
The problem seems to come from CustomUpdateEngine.exe, that was deployed by the WSUS publisher for a custom update. I can see signature is ok, package downloaded ok, but install fail, in the file WindowsUpdate.log.

I execute the update manually by the windows update GUI on the "client" server, and I can see a message about an error to install windows .NET framework 3.5... And the server have .NET framework 4.5
I try to run the CustomUpdateEngine.exe directly from C:\Windows\SoftwareDistribution\Download\Install, same request , CustomUpdateEngine.exe seems to need tu install framework3.5...

Image
Here the link full image http://hpics.li/bf3d1f1

Can anyone have an idea ?

Thanks a lot!
Gaëtan
Marked as answer by gaetan1105 on 4/22/2016 at 8:03 AM
Coordinator
Mar 22, 2016 at 6:03 PM
CustomUpdateEngine is compiled for .Net Framework 2.0, so yes, you need to have, at least, .Net 2.0 on the server.
Editor
Mar 22, 2016 at 6:39 PM
DCourtel wrote:
CustomUpdateEngine is compiled for .Net Framework 2.0, so yes, you need to have, at least, .Net 2.0 on the server.
David,
i think it is a good idea, to compile CustomUpdateEngine with .Net Framework 4.0 in next Version of WPP. On W2012 and newer is not .Net Framework 2.0 and/or 3.5 installed out of the Box. ;)

Thanks and Regards
Winfried
Coordinator
Mar 22, 2016 at 7:40 PM
That will be the case.
Mar 23, 2016 at 9:39 AM
DCourtel wrote:
CustomUpdateEngine is compiled for .Net Framework 2.0, so yes, you need to have, at least, .Net 2.0 on the server.
Hello DCourtel,

I have .NET Framework 4.5 on windows 2012, so It's bigger version than .NET 2.0.

Like WinfriedSonntag said, there is no version of .NET framework 2.0 or 3.5 for Windows 2012R2.

You plan to recompile CustomUpdateEngine closely ? I can be a betatester if needed ;)

If not I can try to do this with the sources, but basically I'm only a network/linux sysadmin :p (and windows now, no choice :p). I can try to document about .NET framework.

Regards,
Gaëtan
Editor
Mar 23, 2016 at 1:01 PM
gaetan1105 wrote:
I have .NET Framework 4.5 on windows 2012, so It's bigger version than .NET 2.0.
If you want to use this now, you have to add the feature .Net Framework 3.5.
Mar 24, 2016 at 12:07 PM
WinfriedSonntag wrote:
If you want to use this now, you have to add the feature .Net Framework 3.5.
Yes but there is a knowed problem with feature 3.5 and windows 2012R2. Here my trace for others :
dism /online /enable-feature:NetFx3ServerFeatures
dism /online /enable-feature:NetFx3
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Enabling feature(s)
[===========================66.6%====== ]

Error: 0x800f0906

The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required t
o restore the feature. For more information on specifying a source location, see
http://go.microsoft.com/fwlink/?LinkId=243077.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

You can try this... But fail for me :
dism /online /cleanup-image /restoreHealth
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031
Image Version: 6.3.9600.17031

The restore operation completed successfully. The component store corruption was repaired.
The operation completed successfully.

This operation takes a lot of time ~40min

--> It's a problem with windows update :
https://support.microsoft.com/en-us/kb/3002547
After you install security update 2966827 or 2966828 (described in Microsoft Security Bulletin MS14-046) for the Microsoft .NET Framework 3.5 and then try to enable the optional Microsoft .NET Framework 3.5 feature in Windows Features for the first time, the feature may not be enabled.

--> The problem seems resolved by this update : https://support.microsoft.com/en-us/kb/3002547
But in my case, I've always got the problem....

I'll try to get framework 3.5 from another source (from cd) and I'll post my test ;)
Editor
Mar 24, 2016 at 6:40 PM
OK, the short way to get .Net Framework:

Create a Folder: c:_source > copy sources\SxS from install DVD/Source.

Delete on the target machine all Registry Settings from WSUS:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate

Restart WUAUSERV.

Now add Feature .Net Framework and tell the Wizard the alternate Path c:_source\Sources\sxs Now it will work. After this, restart the whole server.
Marked as answer by gaetan1105 on 4/22/2016 at 8:03 AM
Apr 22, 2016 at 3:52 PM
Edited Apr 22, 2016 at 3:53 PM
Hello,
Sorry for this long absence.

Thanks WinfriedSonntag for the idea. I've write a PowerShell script to deploy any feature from the cloud or another source. And I write a bat script to install framework3.5 by a GPO at the strating of Windows.

This is my little contribution ^^

Here is the enable_feature.ps1
# author : 
# version : 1.3
# date : 31/03/2016
# description : Enable feature for windows 2012 by GPO
# Warning you can't use the c$ or d$ for the source, it fail because of the '$' caracter

Param([string]$feature,[string]$source)

$logfile=$env:temp+"/enable_feature_$feature.log"
#$virtual_drive="S:"

# Import ServerManager Module
Import-Module ServerManager
$returnCode=0

try {
    $checkFeature = Get-WindowsFeature | Where-Object {$_.Name -eq $feature}
}
catch [System.Exception] {
    "Error to get windows feature $_.Exception.Message" | Out-File -Append $logfile
    $exitCode=2
}

#check and instal feature
If ($checkFeature.Installed -ne "True" )  {  
    if ($source -ne "") {
        try {
            "Adding $feature" | Out-File -Append $logfile
            # Add-WindowsFeature $feature -source $virtual_drive+"\sxs" | Out-File -Append $logfile
            Add-WindowsFeature $feature -source $source | Out-File -Append $logfile
        }
        catch [System.Exception] {
            "Error to add Windows feature with alternative source $virtual_drive - $_.Exception.Message" | Out-File -Append $logfile
            $exitCode=22
        }
    }
    else {
        try {
            Add-WindowsFeature $feature | Out-File -Append $logfile
        }
        catch [System.Exception] {
            "Error to add Windows feature $_.Exception.Message" | Out-File -Append $logfile
            $exitCode=24
        }
    }
    #check if install correct
    $checkFeature = Get-WindowsFeature | Where-Object {
        $_.Name -eq "$feature"
    }
    If ($checkFeature.Installed -ne "True") {
        "Error to install $feature" | Out-File -Append $logfile
        $returnCode=1
    }
}
else {
    "$feature always installed!" | Out-File -Append $logfile
}

exit $returnCode
And here is the bat script to specified which feature to install : framework 3.5
@echo off
copy /Y \\YOUR DOMAIN\sysvol\YOUR DOMAIN\scripts\enable_feature.ps1 c:\
powershell c:\enable_feature.ps1 -feature "NET-Framework-Features" -source "\\YOURWSUS.YOUR DOMAIN\Windows-2012R2x64-sxs\sxs"
rem powershell c:\enable_feature.ps1 -feature "NET-Framework-Core" -source "\\YOURWSUS.YOUR DOMAIN\d$\Windows-2012R2x64-sxs\sxs"
del c:\enable_feature.ps1
And I've add a "fake" custom update, only to see if framework3.5 is correctly installed by the GPO :
I check the same registry value in the "installed" and in the "installable" :
SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\Install
1
REG_DWORD

Result :
  • when framework3.5 is not installed, the wsus publisher said "not applicable"
  • when framework3.5 is installed, the wsus publisher said "installed"
Here the screenshots :
Image
Image
Image
Image

Regards,
Gaëtan

PS : I see CustomUpdateEngine is compiled in .Net Framework 4.0 in next Version of WPP, thanks to the author!
Editor
Apr 23, 2016 at 3:08 PM
Thanks Gaëtan for your Posting and your Solution! :)