Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Available command line switches for .NET Framework 2.0 setup

Available command line switches for .NET Framework 2.0 setup

  • Comments 39

With the release of VS 2005 and the .NET Framework 2.0, we began to use a new Windows Installer external UI handler to manage installation of several of the setups that are part of the VS 2005 family, including the .NET Framework 2.0 redistributable and SDK, J# redistributable, VS Tools for Office redistributable, language packs .NET, J# and VS Tools for Office, etc.

This new external UI handler is named install.exe, and you will find an INI file named install.ini included with each product that uses install.exe.  Install.ini expresses many configuration options for the setup in question.  I have described many of the settings used for the .NET Framework 2.0 redistributable in this blog post.

In addition to the INI file, install.exe can be configured using several command line switches.  The following list provides information about all of the command line switches that are supported by the install.exe external UI handler in the VS 2005 and .NET Framework 2.0 family of products:

  • /a - Launches setup in administrative mode.  This mode is used to create a Windows Installer administrative install point that can then be used to install or deploy the product from.  Administrative mode presents UI that allows you to choose the location to stage the files to
  • /l <log file> - Causes setup to create a verbose log in a non-default path.  Setting this value will override the value of the VerboseLog entry in the install.ini file.  If the /l switch is passed, the log file name is required.  If it is provided, it will override the LogFilePrefix entry in install.ini.  If you choose to pass a log file name and there is a space in the path, you will need to enclose the name in quotes.  Leaving this parameter off will allow setup to create a verbose log file in the %temp% directory that has a name beginning with the LogFilePrefix entry in install.ini and ending with a randomly generated character sequence.
  • /lang #### - Specifies the 4-digit language code for the language in which to display the setup UI.  This setting overrides the OS language check and the language specified in the install.ini file.  Setup looks for a file named install.res.####.dll in the same path as install.exe and attempts to load strings from that DLL.  If the DLL with the numerical value passed in via this command line parameter does not exist, install.exe falls back to English strings (located in install.res.1033.dll).  If install.res.1033.dll also does not exist, setup will display an error dialog and exit
  • /msipassthru MSI_PROP_BEGIN"<properties with quotes here>"MSI_PROP_END - Specifies additional property/value pairs that will be passed to the Windows Installer MsiInstallProduct API (or msiexec.exe). This switch also requires that a token be used to prefix/postfix the actual command line arguments.  For example: /msipassthru MSI_PROP_BEGIN"PROPERTY1=Value1 PROPERTY2=Value2"MSI_PROP_END
  • /msipassthru MSI_ARGS_FILENAME_BEGIN<path to file with properties>MSI_ARGS_FILENAME_END - Specifies the full path to a file that contains additional property/value pairs that will be passed to the Windows Installer MsiInstallProduct API (or msiexec.exe)
  • /q - Specifies quiet install mode. Suppresses the display of all setup UI during installation
  • /qb - Specifies basic UI mode for installation.  This will cause install.exe to only show a small Windows Installer progress dialog with no other user interaction required.  This is the equivalent of the msiexec.exe /qb command line switch
  • /qb! - Extends the /qb switch by hiding the cancel button on the progress dialog during installation.  This is the equivalent of the msiexec.exe /qb! command line switch
  • /qu - Specifies quiet uninstall mode.  Suppresses the display of all setup UI during uninstallation
  • /skip_all_checks - Causes install.exe to skip all prerequisites checks that are specified in install.ini.  This may result in setup failing elsewhere because some of the checks are also specified in the MSI itself.  However, this can be useful as a troubleshooting tool if you know the state of the machine(s) that you are installing on very well
  • /watsonsilent - Causes all Watson reports generated by setup in the case of failure to be silently sent to Microsoft instead of displaying a dialog.  This command line switch is only applicable if one of the /q flags is also used
  • /watsonui - Causes all Watson reports generated by setup in the case of failure to display UI informing the user of the issue
  • /? - Displays a help dialog with information about supported command line parameters.  As I was writing this article I noticed that many of the switches that are supported by install.exe are not actually listed in this dialog.  I'll be reporting a bug to the setup team so that hopefully this will be cleaned up in a future release to present more useful information to the user

<update date="12/7/2005"> Added a note to the /l log file switch indicating that you need to put quotes around the file name if there are spaces in the name </update>


  • Can we install Visual studio 2005 Pro on MCE or a Tablet PC?
  • Hi Ashith - you can definitely install VS 2005 on MCE or Tablet. I'm actually running VS 2005 on one of the MCE computers in my office right now! Please let me know if you run into any difficulties.
  • Hi, My client has only framework 2.0 installed on his machine(only framework 2.0 not VS 2005). I want to add some security settings but there is no shortcut available in administrative tools for "Framwwork 2.0 configuration".

    Can you tell me how i can have framwwork 2.0 configuration shortcut when only framework 2.0 is installed. Thanks
  • Well, read this:
  • Question
    You have written blog posts in the past describing the command line parameters that can be...
  • What does the "/q:a" do?  /q is supposed to be for silent install but I can find nothing ANYWHERE on what "/q:a" means and it is used in almost every silent install I have looked at.

  • Hi Joshua - the /q:a switch is an IExpress self-extracting setup package switch.  Any setup that is built using IExpress will accept that switch.  It suppresses the "are you sure you want to launch setup" and extraction progress dialog that can appear when extracting the contents of an IExpress package at the beginning of a setup.

  • are there any Command Line Switches available for .net1.1
  • I previously posted a list of command line switches for .NET Framework 2.0 setup.&amp;nbsp; One of the customers...
  • Hi Manoj - I have just posted a new list with command line switches for the .NET Framework 1.0 and 1.1 setup packages.  You can find it at http://blogs.msdn.com/astebner/archive/2006/03/18/554535.aspx.
  • This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain...
  • Not truely silent unless you add "/q:a"

  • Hi JC - The /q:a switch is used for the IExpress wrapper (named dotnetfx.exe).  The above command line switches are specific to the .NET Framework setup EXE (named install.exe) It is correct that you have to use that switch as well as the silent switch for the setup EXE wrapper.  The full command line for a silent install of the .NET Framework 2.0 is the following:

    dotnetfx.exe /q:a /c:"install.exe /q"
  • I've extracted the dotnetfx.exe to it's files and I'm trying to install it with the command line of:

    install.exe /msipassthru MSI_PRO_BEGIN"REBOOT="ReallySuppress"MSI_PROP_END /qb!

    And I get a dialog that pops up saying "Cancel, Retry, Ignore" ... it looks like a locked file costing dialog.  

    Shouldn't I not get this?  I'm going to run it with a logfile next and see if my REBOOT public property is realy being set or not.
  • So I see there is a log by default and I can see REBOOT=ReallySuppress was already being called.  So now I'm just calling it twice.  I also see that Install.exe is the ExternalUI that's implementing the FilesInUse pattern.

    I'm also calling this package in /qb! so why should I be getting this dialog?  I know the reason is "mscoree.dll" is loaded by another process but it should just do a MoveFileEx resulting in a pendingrenameop and a 3010 exit code.
Page 1 of 3 (39 items) 123
Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post