Undocumented command line switch to extract the contents of .NET Framework 4 setup

This is a quick follow-up to my previous post about using the /? switch to see a list of .NET Framework 4 command line switches.  It is fairly common to need to extract the contents of a self-extracting setup package (such as to create an administrative install point).  Unfortunately, that command line switch is not documented in the usage dialog for .NET Framework 4 setup or for most updates available on Windows Update for some reason.  It is possible to use a tool like WinZip to extract most self-extracting packages, but if you don’t have a tool like that available on your computer, you can do the following to extract the contents of the .NET Framework 4 setup package:

  1. Download the .NET Framework 4 installer from https://www.microsoft.com/download/en/details.aspx?id=17718 and save it to your desktop

  2. Run the following command line:

    dotNetFx40_Full_x86_x64.exe /x

  3. In the dialog that appears, type in the path that you would like to extract the files to

  4. Alternatively, you can also use a command line like the following to silently extract the contents to a folder without interacting with any UI:

    dotNetFx40_Full_x86_x64.exe /x:c:\dotnetfx4 /q

The above example shows how to extract the contents of .NET Framework 4 setup.  The same /x switch is also supported by many other types of installers, including many of the updates that are available on Windows Update.