We often have customers that want to add additional programs or addins with the Office 2007 installation. Often they will try to use the Office Customization tool to perform this function. Unfortunately the OCT function,  “add installations and run programs”, is not very good at running more than a single additional addin or program.

Here is where it is often attempted:

 Capture

This is NOT where I recommend chaining additional programs and features. I have found that a much more reliable way to chain is by using the config.xml.

In this example I will be chaining the getting started tabs which can be downloaded below:

*note* .net framework 2.0 is required for these to install. This guide assumes .net framework 2.0 is already installed.

Excel 2007 Add-in: Get Started Tab for Excel 2007
Word 2007 Add-in: Get Started Tab for Word 2007
PowerPoint 2007 Add-in: Get Started Tab for PowerPoint 2007

If you are installing Office 2007 ProPlus, you will have a ProPlus.ww folder. If you are deploying Office 2007 Enterprise you will have an Enterprise.ww folder. The config.xml file that we want to modify will by in the WW folder for the product you are installing.

In this example I am deploying Office 2007 Proplus. So I will be modifying the config.xml file that is in the ProPlus.WW folder. My default config.xml looks like this:


<Configuration Product="ProPlus">

    <!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
    <!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Professional Plus Setup(*).txt" /> -->
    <!-- <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" /> –> 
    <!-- <USERNAME Value="Customer" /> -->
    <!-- <COMPANYNAME Value="MyCompany" /> -->
    <!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
    <!-- <LIS CACHEACTION="CacheOnly" /> -->
    <!-- <SOURCELIST Value="\\server1\share\Office12;\\server2\share\Office12" /> -->
    <!-- <DistributionPoint Location="\\server\share\Office12" /> -->
    <!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
    <!-- <Setting Id="Reboot" Value="IfNeeded" /> -->
    <!-- <Command Path="msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->

</Configuration>

*note* For more information about customizations that are possible with the config.xml see this post.

Before we begin I should mention that the <!-- --> that is embracing each line is how a line gets “commented out”. In other words, none of the lines in this config.xml are currently active or being used.

The line we will be working with is the last one. The default line reads: 
  <!-- <Command Path="msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> –>

To deploy the getting started tabs, we will want to modify this line and add additional lines. I will cut to the chase. Here are the lines I would use to deploy these addins from c:\Officeaddins\ during the Office 2007 install.

<Command Path="%windir%\system32\msiexec.exe" Args="/i C:\Officeaddins\Excel2007GetStartedTabSetup.msi /qb" ChainPosition="after" Execute="install" Wait="-1"/> 

<Command Path="%windir%\system32\msiexec.exe" Args="/i C:\Officeaddins\Word2007GetStartedTabSetup.msi /qb" ChainPosition="after" Execute="install" Wait="-1"/> 

<Command Path="%windir%\system32\msiexec.exe" Args="/i C:\Officeaddins\PowerPoint2007GetStartedTabSetup.msi /qb" ChainPosition="after" Execute="install" Wait="-1"/>

As long as I had the msi files in the c:\officeaddins directory the above lines in the config.xml would install them during the Office 2007 ProPlus installation. You might ask… well how do I make sure that these files are in a directory named “Officeaddins” in the c drive on all the machines that I will be deploying Office to? I’ll get to that in a minute.

First let’s break down one of these lines and each part of it.

<Command Path="%windir%\system32\msiexec.exe" Args="/i C:\Officeaddins\Excel2007GetStartedTabSetup.msi /qb" ChainPosition="after" Execute="install" Wait="-1"/>

Command Path="%windir%\system32\msiexec.exe" (This tells windows to use MSIEXEC to perform the install. The default line in the config.xml simply has “Command Path="msiexec.exe" I would not recommend leaving this as is. Msiexec will not always end up being found correctly.

Args="/i C:\Officeaddins\Excel2007GetStartedTabSetup.msi /qb" (This tells MSIEXEC to perform an install “/i” and to perform the install of “C:\Officeaddins\Excel2007GetStartedTabSetup.msi” and to do it with a progress bar only “/qb”.

ChainPosition="after" (This tells the Office install to perform the install AFTER the office 2007 install. If you had this set to before, it would attempt the install before the Office 2007 install.)

Execute="install" (This tells the Office install to “install”. Uninstall would also be an option.)

Wait="-1” (This tells the Office install to wait between each of the addins installation. This is vital, because otherwise they would try to install at the same time and would almost surely fail.)

Ok.. Now.. let’s discuss two things. How the lines in the config.xml change if you are using a source that contains spaces, and how to make sure that the addins are on the local machine in a location that they can be installed from. From here are on are the exact instructions that I would recommend as a best practice to chain these addins with Office 2007.

First… let’s add the addins into the custom.msp from the OCT tool. This will “inject” the files into the MSP and then they will be laid back down into a desired location on the local machine during the Office install.

I think it is good practice to lay the addins into the C:\Program Files\Microsoft Office\ directory. To do that, open the OCT and goto the “add files” section of the OCT. Add each of the files and for the destination path choose [Installlocation]. [Installlocation] will map to C:\Program Files\Microsoft Office\ by default (If using a 32 bit OS).  Here is a screenshot of how my OCT looks when I add these files as described above.