Updated: 2009-10-01

The Setup program for the 2007 Microsoft Office system installs one Office product at a time by default. You can use the chaining feature to customize Setup to run an arbitrary command or a lightweight executable that you want to run when this product is installed. To add an arbitrary command or a lightweight executable, you can use the Add installations and run programs feature in the Office Customization Tool (OCT) or the Command element in Config.xml file. It is recommended that you limit the use of Add installations and run programs and the Command element to running only lightweight executables or arbitrary commands that will not make changes to the computer or that do not require user input. For example, you can run a utility to copy logs or a command to launch a Welcome page at the end of installation.

The Add installations and run programs option in the OCT (command-lines entered in the Add Program Entry and Modify Program Entry dialog boxes) and the Command element in the Config.xml file are intended to be used only for initial product installations and uninstallations. The commands are processed only during initial installations and uninstallations.

ImportantImportant:

Chaining is not as reliable as installing each product separately. For example, if you chain two installations together and one of the products fails or encounters an unexpected error, the primary installation and the chained installation might not complete successfully. Therefore, using the chaining approach is not recommended. The recommended method for installing multiple products together is to use a deployment management program, such as Microsoft Systems Management Server, or Microsoft System Center Configuration Manager 2007, or a third party tool, instead of chaining. For more information, see Using Systems Management Server 2003 to deploy the 2007 Office system and Deploy the 2007 Office system by using System Center Configuration Manager 2007.

For information about Config.xml chained command issues, see KB article 928467, "Chained commands do not run after the installation of a 2007 Office suite or program fails" on the Microsoft Help and Support Web site (at http://go.microsoft.com/fwlink/?LinkId=99913).

To customize the primary installation to run a command

  1. Create a network installation point that includes the product you will install. For more information, see Create a network installation point for the 2007 Office system.

  2. Run the OCT by running Setup.exe from the root of the network installation point with the /admin command-line option. For example, run: \\server\share\Office12\setup.exe /admin.

  3. In the Select Product dialog box, select the product that is the primary installation.

  4. In the left pane of the OCT, select Licensing and user interface. In the right pane, set Display level to None, enter the Product key, and select I accept the terms in the License Agreement.

    For more information about Licensing and user interface and Display level options, see Office Customization Tool in the 2007 Office system.

  5. In the left pane, select Add installations and run programs. In the right pane, click Add.

  6. In the Add Program Entry dialog box, perform the following steps for the executable that is chained.

    • For Target, enter the fully qualified path of the executable file that you want to run after the primary installation. For example, enter \\server\share\Office 12\copylogs.bat.

    • For Arguments, enter the string of arguments to be passed to the executable. For example, enter: QuietArg="/q" Wait="30000"

      For information about the Command element and supported attributes, see Command element in Config.xml file in the 2007 Office system.

      NoteNote:

      As mentioned previously, command-lines entered in the Add Program Entry and Modify Program Entry dialog boxes are intended to be used only for initial installs and uninstalls. Command-lines are processed only during initial installs and uninstalls.

    • Select Run this program after the Office product has been installed to run the program listed in the Target box after the Office installation is complete. This is the recommended option.

      You can also select Run this program before the Office product has been installed if you want the program listed in the Target box to run before the Office installation starts. However, if the program does not terminate normally, or if it restarts the computer, Office is not installed, and programs further down the list do not run.

    • Click OK.

  7. Make other customizations in the OCT as needed.

  8. Save the Setup customization file with a unique name in the Updates folder of the network installation point.

  9. Exit the OCT.

To install the product

  1. Run Setup from the root of the network installation point, specifying the Config.xml file for the primary product. For example, if the primary product is Office Enterprise 2007, enter \\server\share\setup.exe /config \\server\share\Enterprise.WW\config.xml.

  2. In the Select Product dialog box, select the primary product.

After Setup installs the primary product, it runs the arbitrary command or lightweight executable that you specified in the OCT.

TipTip:

You can put the customization files you created in a location other than the Updates folder. Just add the /adminfile option to the Setup command lines in the procedures above to specify the customization files to use. For more information about using Setup command-line options, see Setup command-line options for the 2007 Office system.

How it works

The Setup program for the primary product follows the typical installation process. After that installation is complete, Setup runs the additional lightweight executable or arbitrary command that you specified in the OCT. Setup waits until each program is finished before it runs the next program.

It is important to run the primary Setup quietly. A chained Setup program cannot run if the primary Setup program is running interactively. You must run the primary Setup program with Display level set to None. It is recommended that chained installations also run with Display level set to None. And because you are running Setup quietly, you must enter the product key for each product in the OCT.

See Also