Freigeben über


Command line switches for .NET Framework 4 setup that you might not have known about

Because of some of the posts I’ve written in the past, I often get asked about how to install various products in silent or unattended mode.  In some cases, I am familiar with the product and know how to answer the question.  However, in a lot of cases, I don’t, and in those cases, I try running the installer with the /? command line switch to see if it will display a usage dialog to describe the available options.  This technique doesn’t always help because some installers do not list any command line switches or they only list a selected subset of their supported switches.  However, it has provided some very useful information in the past, and it is worth trying if you are having trouble finding documentation for setup command line switches.

For example, if you download the installer for the .NET Framework 4 and run it with the /? switch, you will see a lot of information about available command line switches.  There are several standard options that are pretty well documented (silent/unattended install and uninstall), and there are several other useful options that you may not have been aware of:

  • /CEIPconsent – allows you to opt into sending customer experience feedback about .NET Framework 4 setup back to Microsoft.
  • /lcid – force setup UI to appear in a specific language instead of the user’s Windows UI language.
  • /log – sets the name and location to use for setup log files.
  • /msioptions – sets parameters (such as MSI properties) that are passed through to each of the .msi files installed as a part of the .NET Framework 4 setup.
  • /pipe – connect a communication channel to allow an installer that chains the .NET Framework to receive installation progress messages.  There is an MSDN article that explains this option in more detail and provides code samples as well.

Comments

  • Anonymous
    February 10, 2012
    The comment has been removed

  • Anonymous
    February 11, 2012
    The comment has been removed

  • Anonymous
    February 12, 2012
    If you open netfx4+lp_slim.vbs in notepad you will see exactly what is edited/removed from the MSI installer's and you are right about the fact that it does break some updates (very few) and repair...this is really for people who dont like to have to install lots of updates after you install the main package, but instead prefer to integrate the updates or service packs and to have them installed in one go

  • Anonymous
    January 08, 2013
    The comment has been removed

  • Anonymous
    January 09, 2013
    Hi mahnaz - I'm checking with some people I know to see if this error is a known issue and if there are any suggested workarounds. In the meantime, can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?

  • Anonymous
    January 09, 2013
    this is the link you ask: skydrive.live.com/redir

  • Anonymous
    January 10, 2013
    i'm waiting for your help pleas thanks

  • Anonymous
    January 10, 2013
    Hi Mahnaz - From your log files, it looks like there is something wrong with Windows Update on this computer.  That in turn is causing a failure to install the .NET Framework 4 and 4.5 because they both include a Windows Update package as a part of their installers.  The knowledge base article at support.microsoft.com/.../971058 might help in this scenario.  There are also some other options for resetting Windows Update that I found in a quick web search.  For example - www.sevenforums.com/.../91738-windows-update-reset.html. Hopefully one of these will help unblock your .NET Framework installation attempts.