Install .Net 3.5 as a feature from the task sequence

Sometimes what seems so easy turns out to be a little bit more complicated.

If you install the MDT-extensions for SCCM 2012 you will get the excellent option to add roles and features. It turns out that only .Net Framework 4.5 will actually install and not 3.5 if you’re installing Windows 8 / Server 2012. The media is on the source media (*.iso/DVD) but not a part of Windows by default.

Install Roles

Windows needs the source files. But how can Windows find them it they’re not on the disk? Microsoft  suggest that you copy all files locally and do the activation with DISM. Another solution is to set a Task Sequence variable (WindowsSource) to point to the package with the Source files. (Thanks to Peter van der Woude in this thread for this idea.) When Windows has a WindowsSource-variable set it’ll automatically know where to look for the DotNet-source files.

1) Create a SCCM-package with all files from the “\sources\sxs” folder on the Windows8/Server2012 iso/DVD.
2) Copy my script “SetPathAsVariable” to the root folder of this package. (Link to script below) This script will set the WindowsSource to the root of the package where all the Source files are (which is on the Distribution Point).
3) Create a task-sequence step before the “Install Roles and Features” which runs said script.

Like this:

TS1

And the “Set Windows Source Path (SXS)” step looks like this:

TS2

The step “Install .Net…” looks like this:

SMSTSLogError1

Here’s the script that you’ll need to place in the package-root for your Source-files. Remember to rename it to *.vbs after you download it.
SetPathAsVariable

Hope it helps someone! Give me a comment to keep my happy!

/Mathias.