Freigeben über


Available command line switches for .NET Framework 2.0 setup

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>

Comments

  • Anonymous
    November 08, 2005
    Can we install Visual studio 2005 Pro on MCE or a Tablet PC?

  • Anonymous
    November 09, 2005
    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.

  • Anonymous
    December 20, 2005
    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

  • Anonymous
    December 28, 2005
    Well, read this:
    http://blogs.msdn.com/astebner/archive/2005/12/19/505734.aspx

  • Anonymous
    February 07, 2006
    The comment has been removed

  • Anonymous
    February 15, 2006
    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.

    Thanks

  • Anonymous
    February 15, 2006
    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.

  • Anonymous
    March 17, 2006
    The comment has been removed

  • Anonymous
    March 18, 2006
    The comment has been removed

  • Anonymous
    March 18, 2006
    The comment has been removed

  • Anonymous
    April 11, 2006
    The comment has been removed

  • Anonymous
    May 16, 2006
    Not truely silent unless you add "/q:a"

  • Anonymous
    May 16, 2006
    The comment has been removed

  • Anonymous
    June 09, 2006
    The comment has been removed

  • Anonymous
    June 09, 2006
    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.

  • Anonymous
    June 09, 2006
    The comment has been removed

  • Anonymous
    June 11, 2006
    The comment has been removed

  • Anonymous
    June 11, 2006
    Hi Christopher - I strongly recommend against using this kind of nested install to chain together multiple MSI packages.  There are some pretty bad issues that nesting in this way can cause - most importantly, it does not allow future hotfixes and service packs for the nested packages to be installed.  You should use some kind of chainer application that is an EXE instead of an MSI to install multiple MSIs one ather the other.  Alternatively, you can deploy the MSIs sequentially using a deployment technology such as SMS or Active Directory.

  • Anonymous
    June 12, 2006
    The comment has been removed

  • Anonymous
    June 12, 2006
    Hi Christopher - From what I know, the technical definition of a nested install is calling one MSI from inside another MSI.  That sounds like what you are doing here, regardless of whether or not the parent MSI actually installs anything, and that causes the problems related to installing hotfixes that I described earlier.  I will ask around and figure out if I have a correct understanding of this scenario and let you know if I hear back anything different.

  • Anonymous
    June 12, 2006
    The comment has been removed

  • Anonymous
    June 12, 2006
    Hi Christopher - I talked to Heath (http://blogs.msdn.com/heaths) a bit and found out that your method is not what I'm thinking of as a typical "nested install" scenario.  I'm sorry for my confusion here and there's no need to be gentle with me if I'm wrong  :-)

    You should be able to install the .NET Framework 2.0 by calling the MSI directly to avoid this problem you're seeing.  Doing that will take install.exe out of the picture (it is the one that stops and restarts the Windows Installer service).  You can find instructions for how to do this at http://blogs.msdn.com/astebner/archive/2005/11/17/494312.aspx.

    Please note that the stopping/restarting of the Windows Installer service is designed to minimize scenarios where an old version of mscoree.dll is held in memory by the Windows Installer service, so depending on your scenarios there is a slight chance that deploying the .NET Framework 2.0 MSI directly could lead to errors while trying to install assemblies to the GAC.  However, if you know that these systems will not be installing the .NET Framework 1.0 or 1.1 within the 10 minutes immediately before installing the .NET Framework 2.0, you'll be safe from that issue.

    Hopefully this helps.  I'm sorry again for my lack of knowledge in this area....

  • Anonymous
    June 12, 2006
    The comment has been removed

  • Anonymous
    June 12, 2006
    Hi Christopher - Fair enough, thank you for your patience with me while I learned more about this scenario.  Please let me know if you run into any additional questions as you work through building your installer.

  • Anonymous
    July 12, 2006
    I previously posted a couple of blog items (here and here) where I mentioned the verbose logging command...

  • Anonymous
    August 27, 2006
    PingBack from http://blogs.msdn.com/astebner/articles/454956.aspx

  • Anonymous
    October 05, 2006
    framwwork 2.0 configuration shortcut when only framework 2.0 is installed. Thanks

  • Anonymous
    October 10, 2006
    Hi Dinceryelen - I'm not sure if you are asking a question or making a statement.  If you are asking a question, can you please clarify exactly what you are asking about so that I can try to help?

  • Anonymous
    October 21, 2006
    The comment has been removed

  • Anonymous
    October 26, 2006
    Question: I have seen some of your other posts regarding how to install various parts of Visual Studio

  • Anonymous
    December 06, 2006
    I received a question from a customer about how to perform a sequential unattended install of the .NET

  • Anonymous
    May 21, 2007
    Aaron, Is it possible to do an unattended "Repair" of .NET 2.0, and specify that the undo information not be stored? I have a very space limited machine, and I get a dialog that notifies me that there is not enough space to continue unless I click on "Ignore" and continue without undo information. I'd like to script this to do the repair operation automatically. Thanks, Desi

  • Anonymous
    May 23, 2007
    The comment has been removed

  • Anonymous
    July 18, 2007
    The comment has been removed

  • Anonymous
    September 18, 2008
    The comment has been removed

  • Anonymous
    September 18, 2008
    The comment has been removed

  • Anonymous
    September 19, 2008
    Aaron, Thanks for your quick reply - my setup runs the dotnetfx install in quiet mode also, so it's the cancel button in my setup.exe app that effectively kills the process, leaving the install in an unknown state. My other thought was to extract the msi from the dotnet wrapper, run an MSIInstallProduct on it, thereby allowing me to use the MSIExternalUI callback feature and trap my cancel there. Since I have to do all this dotnet stuff silently though, I need to also suppress the UI for the extraction of the msi files too...

  • Anonymous
    September 19, 2008
    The comment has been removed

  • Anonymous
    January 20, 2009
    PingBack from http://www.hilpers.com/1041448-silent-installation-net-framework-2-a