MDT

Back to Basic: .NET Framework 4.5.1 deployment in MDT using a VB Script wrapper

Yesterday an OS Deployment friend (you know who you are…) asked around for a way to install .NET Framework 4.5.1 as a part of the reference image creation and I told him I would post it today, so here it is. The reason I do this with VB script wrappers (not only me, most of the people I know and works with OSD does that) is logging and full control, but also the fact that I have a bunch of VBscripts that are very similar and the fact that MDT has a very nice module called ZTIUtility that connects external scripts built in functions make this a very easy choice.

Hey, you might need 4.5.2 instead? –> https://deploymentbunny.com/2014/06/27/back-to-basic-net-framework-4-5-2-deployment-in-mdt-using-a-vb-script-wrapper/

How to Use it

Step 1: Download it

Download it from here: http://1drv.ms/TqAqVD

Step 2: Import it as an Application

Using the Deployment Workbench, import the application with the following options:

  • Application Type:
    • Application with source files
  • Details:
    • Application Name: Install – Microsoft .NET Framework 4.5.1
  • Source:
    • Source Directory: The location where you unzipped the files
  • Destination:
    • Directory Name: Install – Microsoft .NET Framework 4.5.1
  • Command Details:
    • Command Line: cscript.exe Install-NetFramework451.wsf

If you prefer PowerShell to import the application, here is an example POSH Snippet:

Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"

New-PSDrive -Name "DS001" `
-PSProvider MDTProvider `
-Root "E:\MDTBuildLab"

import-MDTApplication `
-path "DS001:\Applications\Install" `
-enable "True" `
-Name "Install – Microsoft .NET Framework 4.5.1" `
-ShortName "Install – Microsoft .NET Framework 4.5.1" -Version "" `
-Publisher "" `
-Language "" `
-CommandLine "cscript.exe Install-NetFramework451.wsf" `
-WorkingDirectory ".\Applications\Install – Microsoft .NET Framework 4.5.1" `
-ApplicationSourcePath "C:\Users\Administrator\Desktop\Install – Microsoft .NET Framework 4.5.1" `
-DestinationFolder "Install – Microsoft .NET Framework 4.5.1" `
-Verbose

Step 3: Download .NET framework 4.5.1 exe file and save it in the Application\Source folder

Download from http://www.microsoft.com/en-us/download/details.aspx?id=40779

Step 4: Modify the Task Sequence

Open your task sequence and add the application like this:

image

Sample of a Windows 7 task sequence with .NET Framework 4.5.1

image
Sample of a Windows 8.1 task sequence with .NET Framework 4.5.1

Note: You might need to add a reboot before and one after, since .Net Framework might feel better, my sequence does not need it, but yours might depending on what you add before this.

Note: For Windows 8/8.1 (Server 2012/2012 R2) I always add .NET 2/3 as Roles BEFORE adding 4.5.1, just to make sure nothing is messed up.

Step 5: Create your Ref Image

/mike

Categories: MDT, OS Deployment, OSD, Reference Image

Tagged as: ,

7 replies »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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