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>