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 http://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.

Comments (8)
  1. Patrick Brady says:

    I was having problems with my Media Center 2005 freezing. I read many comments on the web about this issue and couldn't figure it out, until I ran into a user that had a similar problem. He mentioned that the problem was occurring when his Media Center 2005 downloaded the most recent guide listing. He determined that there was a conflict with .NET framework 4 and when he unistalled it, his media center started humming again. So I tried it as well and sure enough, mine started working again as well. Can you please comment on this issue, hwat the problem is and what if anything I am missing by not having .NET Framework installed?

  2. Hi Patrick Brady – I haven't heard of any problems related to Media Center 2005 not working if the .NET Framework 4 is installed.  There were some issues back in older beta versions of the .NET Framework 4, but my understanding was that those had been fixed prior to the final .NET Framework 4 release.  Were you seeing any specific error messages or event log entries that led you to suspect that the .NET Framework 4 was causing a problem?

    If you don't install the .NET Framework 4, you won't be able to run applications that require it.  Most applications will work equally well on older versions of the .NET Framework, and you've already got at least one version installed because Media Center 2005 requires it.  There are some applications that require specific versions of the .NET Framework, and those are the ones you won't be able to use unless you install the .NET Framework 4.

  3. James says:

    What does the /q option do?

  4. Hi James – In the example listed above, the /q switch will cause the .NET Framework 4 setup package to be extracted without showing any UI or requiring you to click on anything.  This can be useful if you want to automate the extraction without requiring any user interactions.

  5. Guest says:

    What application should i use to extract? .I have try command prompt but it din't work.Please eplain it step-by-step im a beginner

  6. Hi Guest – You can just run dotNetFx40_Full_x86_x64.exe /x from a command prompt or from the Windows Run prompt.  You don't need to use any other application to perform the extraction – the extraction functionality is built into Windows itself.

  7. Peter says:

    Note that in my testing on Windows XP Mode, using the /x switch you can extract the files, but you can't actually run the installer (It will say you need to run Setup.exe which only runs through the extractor). If you use /xc:test to specify the path in the command line it will extract and run – however that command does not work in Windows Vista, 7, 8 etc.. since there is no space between it and the path and I haven't found a way with quotation marks or otherwise to get it to recognize /x as a command while it has more characters attached to it. Quite unfortunate as this would have been great to fix an issue with a Windows Embedded Thin Client which needs .Net Full but only has ~700mb out of 3.8GB available.

  8. Hi Peter – You need to put a colon (:) in between /x and the path you want it to extract the .NET Framework 4 setup payload to.  I'm not sure if you tried that and the command line in your comment is just a typo, but I thought I'd mention it just in case.

    Also, once you extract the contents of the .NET Framework setup package, you should see a file named setup.exe in the extracted folder location, and you can install the .NET Framework using that.

Comments are closed.

Skip to main content