Installing Windows Features without Internet

Installing Windows features (most commonly .NET 3.5 or .NET 2.0) on a Windows 8, 8.1, 10 or Windows Server 2012 (R2) machine, generally requires you to be connected to the internet so that Windows can download the source files from Windows Update. But what happens when you don’t have internet access or if you are sitting behind a proxy and Windows Update is configured to point to WSUS or SCCM?

This post explains various ways to manually specify the source files in order to install the new Windows Feature. You will also learn how to configure the default source file path, so that all future Windows Features will install without any additional user involvement.

Source Files – SxS Folder

If your machine doesn’t have internet access or if WSUS or SCCM has been configured to be used for Windows Updates, then when prompted to use Windows Update as a source file location will most likely fail.

In this scenario the only solution you have is to use the original source files that are found on the Operating System installation media. All of the source files required to install any Windows Feature are found in the sxs folder on the corresponding OS installation media.

Irrespective of what Windows operating system you are installing, the sxs folder is always found in the same location on the corresponding installation media (Note: You will need to use the correct installation media depending on the operating system you are running. In other words, if you are running Windows 8.1, then you would use the source files from the Windows 8.1 install media).

The sxs folder can be found in <installation_media>\Sources\sxs.

Option 1 – Windows Feature Installation using Command Line

The first option you have is to use the command line (and the Dism tool) to install your selected Windows Feature. The problem with this is that you need to know what the feature name is for what you are trying to install. This is not always self explanatory, for example if you want to install .NET 3.5 then the feature name you use in Dism would be NetFX3.

In any case, if you want to install the Windows Feature using command line, complete the following steps:

Ensure you have the correct installation media mounted or available on your machine (e.g. insert the installation media CD or mount the ISO)

Launch Command Prompt as Administrator

To do this, right click the Command Prompt shortcut on the Start Menu and select Run As Administrator

Option 2 – Windows Feature Installation using PowerShell

The second option might be slightly more complicated than the first, depending if you are familiar with PowerShell or not.

To install .NET 3.5 via PowerShell, your command would like something like the example below (depending on the features you want to install and the location of your source files):

Install-WindowsFeature Net-Framework-Cor –Source "D:\Sources\sxs"

For more information about the Install-WindowsFeature cmdlet, see the Technet Article.

Option 3 – Windows Feature Installation via the GUI

This option might seem a bit confusing to you, because I am sure the reason why you are even reading this article at this stage is because you tried installing your selected Windows Feature via GUI (be that Programs & Features in a Windows client OS or Server Manager in a Windows server OS).

There is a trick to this though that will get it to work. That trick is to specify the sxs folder location path via the registry (or even Group Policy). Doing this will ensure that Windows looks at the specified file path first when trying to install any Windows Feature.

Via Registry Key:

To set the source file path for the sxs folder, complete these steps:

Ensure you have the correct installation media mounted or available on your machine (e.g. insert the installation media CD or mount the ISO)

Navigate to <installation_media>\Sources\

Copy the sxs folder from the Sources directory to any location on your local machine. In this example we are copying to C:\Sources\sxs. (Note: You can copy this to a network location so that multiple machines get their source files from a single source if required)

Launch Registry Editor (Start >> Run >> regedit)

Navigate to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing

In this location, create the following registry entry: “LocalSourcePath”=”C:\Sources\sxs” (Note: If you copied the sxs folder to another location then set this as the value)

Close the registry and re-install the Windows Feature using the GUI (i.e. either Control Panel >> Programs and Features or Server Manager)

Via Group Policy:

If you need to set this on a number of machine, perhaps because you are using a network location as the sxs source, then the recommended (and easier) way would be to use Group Policy to set the source file path location.

To do this, you configure the following setting in GPO: Computer Configuration >> Administrative Templates >> System >>“Specify settings for optional component installation and component repair” setting.

If you followed the steps above and you are still getting error 0x800F0906 or 0x800F081F while trying to install .NET Framework 3.5 on a Windows 8, 8.1 or Windows 2012, 2012 R2 machine, then you most likely have some Windows Updates installed blocking your installation.