Tag Archives: .net framework

Windows 8.1 – Installation of NetFx3 by command line will fail if language pack is installed

Published / by Rens Hollanders / 7 Comments on Windows 8.1 – Installation of NetFx3 by command line will fail if language pack is installed

Yes that’s right. Tested it the past week when creating an reference image for a project. It appeared to me that every time when I’ve wanted to install the .NET 2.0 and 3.0 feature on Windows 8.1 via command line or in MDT using the “Install Roles and Features” step and have ‘slipstreamed’ a language pack in Windows 8.1 with DISM upfront, the installation went wrong due to the fact that the Sources\SXS folder could not be found. This is something I’ve already seen as a question on social.technet which also lead to this investigation

figure 1.1: Error showing in bdd.log

netfx04

For reasons unknown as we can see in the logfile the source path is changed from the value that I have specified to: C:\MININT\Sources\ while it should point toΒ “%DEPLOYROOT%\Operating Systems\Windows 8.1 x64 Enterprise\Sources\SXS”

So I’ve started some testing and debugging, tried different scenarios such as: copying files locally, using an cmd installation file etc. Nothing seemed to work when the language pack was installed. Therefore I’ve performed a deployment without any additional language packs and it came to my attention NET FX 3.5 installs correctly without any issues.

Now how did I get around this?

Basically there are three options to install the .NET Framework 2.0 and 3.0 on Windows 8.1

  1. Manual by hand from the GUI
  2. By command line using DISM
  3. By using the “Install Roles and Feature” step in MDT
figure 1.2: Using the GUI
netfx01
figure 1.3: Using the command line
netfx03
figure 1.4: Using the “Install Roles and Feature” step

netfx02

The way to get around this nasty ‘issue’ that DISM ‘sayes’ it can’t find the SXS source file location is to put the installation of NetFX before the installation of the language pack.

Currently I use the following scenario:

Added the Sources\SXS folder from the operating system I use (which is currently Windows 8.1 x64 Enterprise) as an application into the Microsoft Deployment Toolkit and within the application I’ve created the following cmd:

This will copy the Sources\SXS folder locally to the machine into C:\Temp and then executes the DISM command to enable the NetFx3 feature. At the end of my task sequence I perform a cleanup of some folders which deletes the content copied locally. I then call the cmd as command line for my application installation. Perhaps not the tidiest way to do it. But using cmd’s makes sure you can execute multiple commands just by starting one cmd. Instead of having to break things down in MDT with single command lines.

Another solution may be to put an Task Sequence Variable at the beginning of the task sequence called: WindowsSource which holds the following value (points to the following location) “%DEPLOYROOT%\Operating Systems\Windows 8.1 x64 Enterprise\Sources\SXS” and use the “Install Roles and Features” step.

Whatever you do, just make sure the installation of NetFx3 happens before the installation of a Windows language pack. And I’ve put a restart step after the installation of NetFx3 just to be sure. And since this is during the building of the reference image, time is not of the essence here. So having another reboot more or less doesn’t matter in this particular case.

figure 1.5: Task Sequence Variable – WindowsSource
netfx05
figure 1.6: Task Sequence Properties – “Install Roles and Feature” step

netfx06

Or use an application, like the script mentioned above:

figure 1.7: Application Properties
netfx07
figure 1.8: Task Sequence Properties – Install Application

netfx08

Hope this can be of help to anyone, if you have encountered something different. Have a different approach or just want ask something? Please feel free to contribute in the comments. Thanks for reading πŸ™‚