Deploying Microsoft .NET 4.6.1 with SCCM 2012 R2

I recently was tasked with packaging and deploying .Net Framework 4.6.1 and found that when I deployed it as an application in SCCM 2012 the install would fail with a generic 0x80004005 error. It turns out that the offline installer exe cannot successfully decompress its installation files when deployed as an application. Apparently the .NET product team has confirmed issues with installing any version of .NET Framework 4.5 and above via an application when using the default installer, though I could not find the official explanation.

There are many possible solutions floating around on the net, including:

  • Using the following cmd line: NDP461-KB3102436-x86-x64-AllOS-ENU.exe /q /norestart /ChainingPackage ADMINDEPLOYMENT.
  • Ticking the “run as 32bit process” checkbox in the Deployment Type properties of the SCCM application.
  • Changing the detection method.
  • Extracting the files manually by running 7zip, then creating an install script. This is discouraged by MS, not to mention a total hassle.

Eventually what I found worked was simply changing the deployment to an SCCM package install. No need for a detection method (although that wasn’t the issue for the failed installs in my case) and simpler to put together. You can set the install/uninstall as command lines in the package, or you can use PSADT that allows for way more options, if need be. Here’s the code:

[box style=”1″]

##*===============================================

##* INSTALLATION

##*===============================================

[string]$installPhase = ‘Installation’

Execute-Process -Path ‘NDP461-KB3102436-x86-x64-AllOS-ENU.exe’ -Parameters ‘/q /norestart’ -WindowStyle ‘Hidden’

##*===============================================

##* UNINSTALLATION

##*===============================================

[string]$installPhase = ‘Uninstallation’

Execute-Process -Path ‘NDP461-KB3102436-x86-x64-AllOS-ENU.exe’ -Parameters ‘/q /norestart /uninstall’ -WindowStyle ‘Hidden’

[/box]

Install cmd: Deploy-Application.exe -DeployMode “Silent”

Uninstall cmd: Deploy-Application -DeploymentType “Uninstall” -DeployMode “Silent”

Note:

Version 4.6.1 was shipped as an operating system component in Windows 10 November Update (v1511).

Also, when you install 4.6.1 it will uninstall all previous installs of .NET. If you need to revert to an earlier version, say 4.0, you’ll need to reinstall it manually or as a separate package.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.