Installing dotnet3.5 on windows 8.1 ….
Wow, this was an extremely long and difficult process for me to achieve, but in the end a simple solution was the answer – DISM!
One of our corp apps requires .NetFramework 3.5 (dotnet3) and as you know, windows 8 comes pre-loaded with dotnet4.
We are going to use System Center (SCCM2012) server to deploy a windows 8.1 image (that was built using the build and capture process) and "update" it with dotnet3.5 using DISM on the OFFLINE image (wim) file.
Note: I tried countless times to use the WDS, OSD process to install dotnet3.5, i tried using powershell, creating package files, using the "roles and features", nothing worked. now there was one process i didnt try
which basically involved copying the SXS source files to the local c drive – to me this seems counter intuitive, I *should* be able to use the source files on a network share, but reading many blogs; the consensus was that the way to do this was to copy the sxs locally and run a script install.
Even using the MDT "install roles and Features" didnt work:
I tried setting a Task Sequence Variable "WindowsSource" and pointed to \\sccmserver\Sources\win8_sxs_dir
In any case, this is the following method i used to make it work for me. and at the end of the day, does what i need it to do.
Here we are assuming that, you have SCCM2012 r2 in a working environment, you know how to build and capture, deploy application etc etc.
1. I copied my Windows 8 image file (incase sometime borked up) and named it with -"dotnet"; this would ten be the image file that includes dotnet.
2. now using powershell or cmd prompt we are going to perform an offline install for the "roles and features" using DISM.
on the SCCM server:
Dism /Get-ImageInfo /ImageFile:"E:\Sources\Operating Systems\Images\Windows 8.1\Win8.1u1-x64-dotnet.wim"
//mount the image to a local folder (create a new folder if it doesnt exist e.g. c:\temp\win")
Dism /Mount-Image /ImageFile:"E:\Sources\Operating Systems\Images\Windows 8.1\Win8.1u1-x64-dotnet.wim" /index:2 /MountDir:C:\temp\win
// USE DISM to install-dotnet into the image
DISM /Image:C:\temp\win /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:E:\Sources\win8_sxs
// Check the installation
DISM /Image:c:\temp\win /Get-Features /Format:Table
//Commit the changes
Dism /Commit-Image /MountDir:C:\temp\win
//I ran the check again, it showed "pending" but after deploying it worked so seems to be all good.
//now unmount the image
Dism /Unmount-Image /MountDir:C:\temp\win /commit
Make sure you update your Image locations for the "apply data image 1" and "Apply Operating System".
Also update your OS image
Make sure you have 2-2 selected (for your OS partition – *note* this may depend on your image file and build process)
5. PXE boot and test the deployment
(*note* on my initial deployment I disabled installing applications and updates in the Task Sequence, in order to speed up the deployment and test that its working as required)
8. In the Task Sequence I re-enabled "install updates" and "install applications" deployments.
9. Test deploying the Task Sequence again and make sure everything is working for workstation deployment