Deploy NET Framework 4.7

How to Deploy .NET Framework 4.7 With SCCM

How to deploy .NET Framework 4.7 with SCCM. This step-by-step guide will hold your hand through the entire process from downloading the .Net Framework, creating the application and deployment types in SCCM with silent installer, and deploying .Net Framework 4.7 to a collection of computers

Download .NET Framework 4.7 offline installer: https://www.microsoft.com/en-us/download/details.aspx?id=55167

OS Requirements for .NET Framework 4.7

.NET Framework is supported to run on the following operating systems:

  • Windows 7 SP1
  • Windows 8.1
  • Windows 10 (Anniversary Update)
  • Windows Server 2008 R2
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016

Prerequisites for .NET Framework 4.7

.NET Framework 4.7 requires the D3DCompiler to be installed on Windows 7 SP1, Windows 2008 R2 and Windows Server 2012 before you can install .NET Framework 4.7. It is available from the Microsoft Update Catalog.

Reference: https://support.microsoft.com/en-us/help/4020302/the-net-framework-4-7-installation-is-blocked-on-windows-7-windows-ser

Create D3D Compiler Application in Configuration Manager

We will create an application for D3D Compiler in Configuration Manager, and set this application as a dependency when installing .NET Framework 4.7 on Windows 7, Windows Server 2008 R2 and Windows Server 2012. Configuration Manager will then check if D3D Compiler is installed on these operating systems, and if not found, install it first before it attempts to install .NET Framework 4.7

Note: This step is only required if you plan to deploy .Net Framework 4.7 to Windows 7 SP1 and Windows Server 2012.

For practical reasons, this guide will only show the steps for Windows 7 SP1 64-Bit, but repeat them for any Windows 7 SP1 32-Bit and Server 2012 as well if you want to deploy .NET Framework 4.7 to them.

Install string (Windows 7 SP1 64-bit)

wusa.exe Windows6.1-KB4019990-x64.msu /quiet /norestart

Uninstall string

wusa.exe /uninstall Windows6.1-KB4019990-x64.msu /quiet /norestart

PowerShell detection method

We will set D3D Compiler as a dependency for the .NET application, so I want a PowerShell detection method that only checks if D3D Compiler is installed on the required operating systems. If it checks for the dependency on a operating system where this is not required, I want the detection method to return installed to allow installation of .NET Framework 4.7 to proceed.

$KB = 'KB4019990'

function Get-Update {
    Param([Parameter(Mandatory=$true)]$KB)
    $hotfixes = get-hotfix | Select-Object -ExpandProperty HotFixID
    if ($hotfixes -match $KB) {
        Write-Output 'Installed'
    }
}

$OS = Get-WmiObject -class Win32_OperatingSystem
switch -Wildcard ($OS.Caption) {
    "*Windows 7*" {Get-Update -KB $KB}
    "*Windows 8.1*" {Write-Output 'Installed'}
    "*Windows 10*" {Write-Output 'Installed'}
    "**Server 2012*" {
        if ($OS.Caption -like "*R2*") {Write-Output 'Installed'}
        else {Get-Update -KB $KB}
    }
    "*Server 2016*" {Write-Output 'Installed'}
}

Create a new application in SCCM. Select “Manually specify the application information”.

How to Deploy .NET Framework 4.7 With SCCM 1

Name the application “D3D Compiler”

How to Deploy .NET Framework 4.7 With SCCM 2

Skip the application catalog, and click new deployment type at deployment types. Select script installer and manually specify the deployment type information.

How to Deploy .NET Framework 4.7 With SCCM 3

Type in D3D Compiler as the name of the deployment type.

How to Deploy .NET Framework 4.7 With SCCM 4

Content location: Browse to the network location where you stored the D3D Compiler files.
Installation program: Copy and paste the install string.
Uninstall program: Copy and paste the uninstall string.

How to Deploy .NET Framework 4.7 With SCCM 5

We will use our PowerShell detection method. Select “Use a custom script to detect the presence of this deployment type”, and click Edit…

How to Deploy .NET Framework 4.7 With SCCM 6

Select PowerShell as script type, and paste in the PowerShell detection method.

How to Deploy .NET Framework 4.7 With SCCM 7

Select Install for system, whether or not a user is logged on, and hidden.

How to Deploy .NET Framework 4.7 With SCCM 8

We don’t specify any requirements even tough we only want this installed on Windows 7 SP1 and Windows Server 2012. Our detection tricks SCCM to believe D3D Compier is already installed if it’s deployed to another operating system. This is important for dependency to work as the .NET Framework 4.7 use the same installer for all supported operating systems.

How to Deploy .NET Framework 4.7 With SCCM 9

No dependencies for the D3D Compiler application. Click next until the application is created.

How to Deploy .NET Framework 4.7 With SCCM 10

Last step: Distribute the D3D Compiler application to your distribution points.

Create .NET Framework 4.7 Application in Configuration Manager

Silent installation string for .NET Framework 4.7 (All operating systems)

NDP47-KB3186497-x86-x64-AllOS-ENU.exe /q /norestart /ChainingPackage ADMINDEPLOYMENT

Uninstall string for .NET Framework 4.7

wusa.exe /uninstall KB3186497 /quiet /norestart

.NET Framework 4.7 Registry key detection clause:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Name: Release
Type: DWORD
Value:

  • Windows 10 Anniversary Update: 394802
  • All other OS versions: 394806

Create a new application in SCCM. Select “Manually specify the application information”.

How to Deploy .NET Framework 4.7 With SCCM 1

Type in .NET Framework 4.7 as the name of the application.

Deploy .NET Framework 4.7

Skip the application catalog. At deployment types, select create new deployment type. Enter Install .NET Framework 4.7 as the name of this deployment type.

How to Deploy .NET Framework 4.7

Content location: Specify network share where you stored .NET Framework 4.7
Installation program: paste in the install string.
Uninstall program: paste in the uninstall string.

Deploying NET Framework 4.7 with configuration manager

Click Add Clause at detection methods. We will add two registry checks. Make sure it says “Or” in the connector as the first is for Windows 10 1607 while the second is for all other operating systems.

How to Deploy .NET Framework 4.7 With SCCM 12

The registry detection method on Windows 10 1607.

.NET Framework 4.7 detection method Windows 10 1607

And the registry detection method to detect the presence of .NET Framework 4.7 on all other operating systems.

.NET Framework 4.7 all other OS

In user experience, select Install for system, whether or not a user is logged on, and hidden.

.NET Framework 4.7 user experience

As a dependency, we will add the D3D Compiler application that we created earlier. Our detection method tricks SCCM to believe it is already installed on operating systems that won’t need it, while it will check for it’s presence on Windows 7 SP1 and Windows Server 2012 and install if necessary.

Click “Add…” to add our dependency.

How to Deploy .NET Framework 4.7 With SCCM 13

Again click Add and select D3D Compiler, and make sure “Auto Install” is checked.

How to Deploy .NET Framework 4.7 With SCCM 14

And are are done creating the application. Click next until it is created.

Right click on the application and distribute it to the distribution points of your need.

Deploy .NET Framework 4.7 with SCCM

Right click the .NET Framework 4.7 application that we just created and select deploy.

Specify the collection you want to deploy it to.

Deploy .NET Framework 4.7 with SCCM

Distribute it to your distribution point if you haven’t already done that.

Deploy .NET Framework 4.7 ConfigMgr

Chose Install for action. Select Required as purpose if you want to forcefully install it, and available if you want your users to manually start the installation through software center.

Deploy .NET Framwork 4.7 Configuration Manager

Select “As son as possible” if you want the deployment to install immediately, or set another schedule for it to be available until the mandatory deadline (where a forced installation will happen).

SCCM .NET Framework 4.7

Decide whether you want the application to be visible in software center, and if users should see any notifications.

.NET Framework silent install

Continue to press next and you are all done.

Congratulations, .NET Framework 4.7 have been successfully deployed.

Anders Rødland

Anders Rødland started his IT career in 2006. My main focus is MS Configuration Manager and client management, and I have passed 17 Microsoft certifications since then. My main expertise is on client management with Microsoft Endpoint Manager: Intune and Configuration Manager. I also do a lot of work on the security side with Microsoft Defender for Endpoint. In addition to my Microsoft certification, I also have an ITIL v3 Foundation certification. This is my private blog and do not represent my employer. I use this to share information that I find useful. Sharing is caring.

5 thoughts to “How to Deploy .NET Framework 4.7 With SCCM”

  1. Great guide again Anders.

    I’m curious about the Win7x86 and WS2012 scenarios. Adding no requirement to the D3DCompiler prereq will always run the first Deployment Type only. Since there are separate content files (MSU) for each of the OSs I expect that 3-4 Deployment Types would be needed with associated OS version requirements, then the last Deployment Type would have no content (just run ipconfig.exe) but use the nifty PowerShell trick as the detection method (or use the OS Version number >= 6.3).

  2. Jeff is correct.

    @Anders I think you have referenced the registry key numbers from 4.6.2. This also leads me into a question. During the deployment of 4.6.2 you have the registry detection Operator set to Equals. I’m new to SCCM, so please correct me if I’m wrong, but wouldn’t we want to set that to Greater Than or Equal To, so that if the user has 4.7 installed this application will not try to install over it?

    Thanks for the write-up!

    1. Hey Guys. I have a working deployment of this, based on the guide above. With a few changes…

      —I have “Download Content from Distribution Point and Run Locally” selected in the Deployment Type – Content menu.
      —I also have “Run installation and uninstall program as 32-bit process on 64-bit clients” checked.

      You could also try extending the max runtime past 120 minutes (this would make sense if your deploying to older hardware)

      I’m deploying to all Windows 7 SP1 x64 machines. I have a 95% compliance out of 5,500 machines.

      Hope this helps.

      EricO

      1. Hi Eric,
        Thanks for your suggestions. In my situation, making a change at “Run installation and uninstall program as 32-bit process on 64-bit clients” checked. fixed the problem. Before that I was getting return code 16389. So, you saved me a lot of time! 🙂

Leave a Reply

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