June, 2009

  • -Office 2007 customized install walkthrough-

    -Office 2007 customized deployment walkthrough-

    In this walkthrough we will create a custom Office 2007 source. We will customize our Office 2007 installation via the config.xml and the Office Customization wizard.

    Become familiar with the following acronyms, as they will be used throughout this walkthrough.

    OCT = Office Customization Tool 
    RTM = Original retail release (Release to Manufacturing)
    GPO = Group Policy Object
    VL = Volume License
    SP = Service Pack

    There are a few important things to know/complete before we begin.

    1. The RTM version of the OCT has been updated. There is an updated version of the OCT that should be downloaded here:

    2007 Office system (SP2) Administrative Template files (ADM, ADMX, ADML) and Office Customization Tool (AdminTemplates.exe)
    http://www.microsoft.com/downloads/details.aspx?FamilyId=73d955c0-da87-4bc2-bbf6-260e700519a8&displaylang=en

     
    This download contains a couple useful items:

         Oct 2.0 

    · The Office GPO ADMs and ADMX files
    · The updated OCT tool files
    · An XLSX spreadsheet that contains all of the settings that can be manipulated via the office GPOS and the “modify user settings” section of the OCT. *I use this searchable file all the time. It is nice to be able to search for a setting, see what registry keys each setting manipulates to take effect, and also the hierarchy of the settings as you will see them in the OCT and in the GPO. *    -Note- The Outlook ADM settings are missing in the Sp2 xls spreadsheet. An update is expected.

    When you run AdminTemplates.exe you will be prompted for a location to extract the contents. Extract them to a location that is handy. In order to update the OCT tool, copy the admin folder from your handy location, and overwrite the admin folder that is in your local Office 2007 source.
     *Naturally if your Office source is on a CD this will fail. Copy the Office 2007 source to a local folder or network share first*

    After replacing the admin folder, the next time you run the OCT, it will be version Sp2 of the OCT.

    -       What if you already have an MSP that you had created in the previous version?  

    If you already have a custom.msp that you had created in the RTM version of the OCT, I would recommend that you create a brand new MSP with the new OCT, and manually recreate the settings from your original. The reason why you should do it this way rather than just resaving your old .msp with the new OCT, is because there are a couple syntax issues in the RTM version that will give you the opposite results of what you expect in the newer version. Example: In the RTM version of the OCT you might set the following item to enabled:

    cached

    Now if you install version Sp2 of the OCT and simply resave your msp, look at how this option is now worded.

    cached2

    So if you previously had this setting set to enabled (to disable cached exchange mode in new profiles) in the RTM version it wasn’t working because there was a syntax error (maybe you didn’t know it though) and now that you open and resave with Sp2 OCT the option is USE Cached exchange mode. If you didn’t know to check, it will still be enabled, and now it will be working correctly (in that it will enable cached exchange mode), but that won’t be what you want. You wanted the opposite. You want this option disabled.

    Anyway… hopefully that sold you. Don’t just open and resave your .msp with the new version of the OCT. Open the old one side by side with a fresh new one and manually duplicate the settings so you can review the options in the Sp2 version and make sure it is doing what you want.

     2.    The config.xml will take precedence over the custom.msp that we will create. If you have the product key configured correctly in the OCT, but you have it incorrectly configured in the config.xml, the config.xml will win and your install will fail.

     3.    The config.xml can be used alongside the custom msp. In fact in some cases it should be. There are some settings that can be set in the config.xml that are required to be set there, or in some cases just work better there than they do in the custom.msp. I will go over that later.

     4.    Do not modify ANY RTM files in the Office 2007 source except the config.xml, and of course replacing the admin folder with an updated version. The other xmls (like setup.xml) are signed and if they are modified your install will fail.

     5.    Any .msp files that you place in the updates folder will run automatically during the initial install if they are applicable to the install.

     6.   Are you using VL media? You will not have the ability to customize the installation with the OCT with retail media.

    Let’s look at our default installation source. I have copied this source from my Office 2007 Volume License ProPlus media into a local folder on my machine.


    original source 

        You can tell just by looking at the source that this is Volume License “corporate” media. There are two immediate ways to tell. First, VL media will have an “admin” folder in the root. The second way to tell is by the name of the XXX.WW folder. In my case I am using ProPlus, so I have a ProPlus.WW folder. If I had Office 2007 Enterprise I would have an Enterprise.WW folder. If this was retail media (non-VL) my WW folder would be named ProPlusr.ww. For retail Enterprise media the folder would be named Enterpriser.ww.

        This walk through is intended for those of you installing with Volume License media because we are going to customize our installation with the OCT. The OCT is not available in retail media, and if you did create a custom.msp and you tried to run it with retail media it would fail. From my previous section on updating the admin folder you may have deduced that the admin folder is the OCT tool. For retail media… no admin folder, no OCT.

        You can tell by looking at my source that this is the English version of Office 2007. It is important to note however, that Office 2007 is in fact language neutral. That is why the WW folder doesn’t contain a language identifier in the folder name. If I were to remove all of the .en-us folders, and replace them with ja-jp folders I would then have a Japanese version of Office 2007. Or… if I were to add ja-jp folders to my source I would then have an Office 2007 source that had the capability of installing Office 2007 in Japanese, or in English, or it could be configured to install both languages. Here is a screenshot of Office 2007 Enterprise media with the capability of installing either Office 2007 in Japanese, or English, or both.

     

     two lang

     

    The way that you determine what language to install, or if you want to install both is by modifying the config.xml. I won’t go into that in this walkthrough, but here is an article that describes the process.

    Customize and deploy multiple language versions of the 2007 Office system
    http://technet.microsoft.com/en-us/library/dd162397.aspx

         Let’s start our customization extravaganza by including Service pack 2 with our installation source. In previous versions of Office you might have heard the term slipstream. The idea of slipstreaming a patch into a product typically involves having the patch overwrite the files in the source which it would supersede.  A good example of this is when you buy a Windows XP disc that has Sp2 or Sp3 built into it. You don’t have to install windows RTM, and then apply the service pack, the service pack is just built in. In previous versions of Office it was possible to “slipstream” service packs. With Office 2007 there is a new update mechanism. The “Updates” folder. Updates that we place into the updates folder will apply during the installation of Office if they are applicable. With Office 2007 however, this isn’t technically “slipstreaming”. Since we are simply placing the updates in the updates folder and not replacing RTM files with service pack files it isn’t what someone would traditionally call slipstreaming.

    Anyway, enough of the history/”geek speak” lesson.

    Before we download Service pack 2, I’m going to quickly review the many flavors of Office Service pack 2.  

    List of all 2007 Office system Service Pack 2 and Windows SharePoint Services 3.0 Service Pack 2 packages
    http://support.microsoft.com/kb/968170/

    First we have Office 2007 Suite service pack 2.
    This service pack will be applicable to any Office 2007 suite, and all Office 2007 standalone products that could be included in a 2007 suite.
    http://www.microsoft.com/downloads/details.aspx?FamilyId=B444BF18-79EA-46C6-8A81-9DB49B4AB6E5&displaylang=en

    There are a couple of exceptions in the Office 2007 family. These standalone products require their own service packs.

    Visio 2007 Sp2
    http://www.microsoft.com/downloads/details.aspx?FamilyId=78E36742-8BDA-471E-88E6-9B561BB06258&displaylang=en
    Project 2007 Sp2
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C126FA4A-B43F-4F7E-A9D4-522E92A6CFEE&displaylang=en
    Sharepoint Designer 2007 Sp2
    http://www.microsoft.com/downloads/details.aspx?FamilyId=88EFF285-0B92-45ED-979B-65AA22304DD6&displaylang=en

    Next we have language pack service packs. Since Office 2007 is language neutral we also have service packs for the individual language packs. You don’t always need to install them additionally however. The primary language of the Office Suite SP2 download will include a service pack update for that same language. So if you install the English version of the Office 2007 Suite SP2, it will include a SP2 patch for the English language pack. If you bought Office in the US at a best buy for example, you are good with just the Office 2007 suite SP. But let’s suggest for a moment that you bought a copy of Office 2007 in France, and you brought it back home to the US and added an English language pack. Well now you will need to install the French Office 2007 Suite Sp2 patch, and the English language Sp2 patch to be fully patched.

    The Office 2007 language pack Sp2 patches can be downloaded here:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=E1203DB2-1CC9-4809-9B6E-3F232CB8899F&displaylang=en

    It should also be mentioned that new to Sp2 is the ability to uninstall. With all previous service packs for Office this was not possible, but with Sp2 we introduced the “Microsoft Service Pack Uninstall Tool”.  (Oarpman.exe)

    There is a blog discussing the functionality of the uninstall tool here.

    So let’s begin customizing our Office 2007 source.

    1.  First we are going to ensure that Sp2 gets installed along with Office 2007 during its initial installation.

    Download Service Pack 2 for the Office 2007 suite.
    http://www.microsoft.com/downloads/details.aspx?FamilyId=B444BF18-79EA-46C6-8A81-9DB49B4AB6E5&displaylang=en

    Save the download to a local location on your machine. I have saved the SP2 download in a folder named c:\sp2 for this walkthrough.

    Sp2

    In order to ensure that SP2 installs during the initial installation of Office we will need to extract individual Sp2 updates from the executable to be placed in the “updates” folder. Remember that only .msp files will apply automatically during an Office installation.

    To extract the individual updates from Sp2 I will run the /extract command from a command prompt. Now we could just use /extract and we will be prompted for the location to save the files to. To save myself one step I am going to specify the location by using /extract:c:\Sp2 like so:

    extract 

    After agreeing to the licensing we see the following screen:

    extracting

    Now when we investigate the c:\Sp2 folder we will see the following files:

    files

    I am going to copy the MSP files directly into the updates folder of my Office 2007 installation source. The office2007sp2-kb953195-fullfile-en-us.exe, and eula.txt files can be deleted because they are not needed going forward.

    That’s it. As long as these 8 MSP files have been placed in the updates folder they will automatically apply to the Office 2007 installation as it is occurring. These same steps can be followed for any Office 2007 update. Not just service packs.

    2.    Now that we have ensured that Office will be updated with the latest service pack during it’s installation, lets configure the installation to our liking. There are two built in ways to configure an Office 2007 installation.

    • Config.xml
    • Office Customization Tool

    Before we start playing with these two customization options it is important to remember that the config.xml will take precedence over the settings in the Office Customization Tool (OCT) if they have conflicting settings.

    The config.xml has many options that can be configured, and rather then trying to squeeze all that information into this walkthrough, I would recommend that you view this blog entry for a full breakdown of the options that can be configured in the config.xml.

    To keep this walkthrough simple, I am only going to configure the following items in the config.xml in this example:

    • Display level = none
    • Silent installation (no GUI)
    • Verbose logging enabled
    • Product Key
    • Prevent reboot after installation
    • Disable completion notice
    • Suppress modal
    • accept eula

    Since I am configuring the installation source for ProPlus, I am going to edit the config.xml from the ProPlus.ww folder. Here is what the default config.xml looks like:

    <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>

    After I configure the options that I listed above in my bullet points my new config.xml will look like this:

    <Configuration Product="ProPlus">

        <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" /> 
        <Logging Type="verbose" 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="SETUP_REBOOT" Value="NEVER" /> 
        <!-- <Command Path="msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->

    </Configuration>

    *Note* I have removed the leading <!-- and proceeding --> on the options that I am trying to set because they act as comment lines. These must be removed to make the lines active.

    I left the other lines in the config.xml that are commented out, but I could technically remove them so my config.xml looks like this:

    <Configuration Product="ProPlus">

        <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" /> 
        <Logging Type="verbose" Path="%temp%" Template="Microsoft Office Professional Plus Setup(*).txt" /> 
        <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" />
        <Setting Id="SETUP_REBOOT" Value="NEVER" /> 

    </Configuration>

    Personally I like to leave the commented lines in however, because it reminds me in the future what other options are available to set in the config.xml.

    3.    Now let’s configure the installation with the Office customization tool. It should be noted that the OCT is a better method of configuring an Office installation. There are many more options available. There are just a couple of examples where using the config.xml is a better option than using the OCT. One example is when chaining additional components. If for example you wanted to chain the getting started tabs, I would not recommend that you use the “run additional programs” section of the OCT. The config.xml handles chaining much better. If you were going to chain anything here is a blog post that discusses how the config.xml can be used to chain additional installations during the installation of Office 2007.

    There are hundreds of configuration options available via the Office customization tool. Just like with the config.xml above I won’t go over all the settings that are available here in this post. I would recommend that you view this blog entry for a full breakdown of the options that can be configured in the Office customization tool.

    For the purposes of this walkthrough we will set the following items in the OCT:

    • Organization Name
    • Set InfoPath to “Not Available”
    • Set Access 2007 to “Installed on first use”
    • Disable Customer Experience Improvement program
    • Disable Opt-in Wizard on first run
    • Enable Automatically receive small updates to improve reliability
    • Disable the prompt to download Microsoft Search 4.0 on Windows Xp machines
    • Disable RSS feeds in Outlook
    • Auto configure the Outlook 2007 Profile
    • Enable Cached exchange mode in Outlook 

    To launch the OCT use the following command:

    setup.exe /admin

    Here is how mine looks:

    cmd 
    *Remember that this is only available with a volume license version of the Office 2007 media.*

    The Office customization tool will open to a screen asking you whether you want to create a new customization file, or if you want to open an existing Setup customization file.

    Select Product

    Click OK to create a new customization file. The first screen we will modify will be the “Install location and organization name”. I am going to leave the “default installation path” set to default but I will add Microsoft as the “Organization name”.

    Orgname

    Next we will set the feature installation state for Infopath to Not Available, and Access to Installed on first use.

    InstallationStates

    For the next few configuration changes we will click on “Modify user settings” on the left.

    usersettings

    There are hundreds of individual customization settings that can be made here. I want to keep this walkthrough relatively simple so we will only be touching a couple settings, but one thing to reiterate is that while this section looks daunting it becomes much easier if you remember to reference the Office2007GroupPolicyAndOCTSettings.xls spreadsheet to locate specific settings. This will make locating items in the “modify user settings” section much easier. As an example, lets use the Office2007GroupPolicyAndOCTSettings.xls spreadsheet to help locate the “Disable Customer Experience Improvement program” setting in the “Modify user settings” section.

    Open the spreadsheet and make sure we are looking at the “OPA Settings” tab at the bottom.
    *The ADMX, ADML, and ADM Settings” tab is for configurations in the GPO ADM files.*

  • I’m going to search the spreadsheet for “Customer Improvement”. My search brings me to the following line in the spreadsheet.

    spreadsheet

    There are a couple points of interest now that our search has located the setting we are looking for. 

    - Notice in columns O, P, and Q the spreadsheet is listing what registry key gets set when we modify this setting in the OCT.
    It states that when I modify the “Enable Customer Experience Improvement Program” setting the following key is set:

    Associated Registry Key = Software\Microsoft\Office\12.0\Common
    Registry Value Name = QMEnable
    Registry Values = 1 | 0 
    *For the “Associated Registry Key” it will be using the HKCU hive*

    So in summary we could set this reg key below, and it would perform the same function as setting it in the OCT.

    [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common]
    "QMEnable"=dword:00000000

    - The next thing to point out from our spreadsheet is that we can see the breakdown of where we would find this setting in the OCT. In the screenshot above you can see the following hierarchy:

    CURRENT USER/Microsoft Office 2007 system/Privacy/Trust Center

    Going back to our OCT, let’s follow that structure to find the customer improvement setting in the “Modify user settings” section.

    custimprovement

    So as you can see in the OCT when we expand, Microsoft Office 2007 system/Privacy/Trust Center we find the customer improvement option. Using the Office2007GroupPolicyAndOCTSettings.xls spreadsheet sure makes locating individual settings a lot easier then if we attempted to hunt and peck through “Modify user settings”.

    Here we have set the Opt-in Wizard to disabled, the Customer Experience Improvement Program to disabled, and we enabled the “Automatically receive small updates” option.

    Let’s set the the last two settings we will be configuring in the “Modify user settings” section.

    rss

    search

    Now let’s automate the creation of the Outlook profile. We will do this in the “Outlook profile” section of the OCT. First we will choose “Modify Profile”. This is typically the best option as it will create the profile using the settings you specify, but if a profile already exists, Outlook will simply use the existing settings rather than the settings we will specify in the OCT.

    outlook1

    After specifying that we want Outlook to “Modify Profile”, we will need to specify exchange settings that will be used to create a new Outlook profile if there isn’t already a previous Outlook profile on the box that will be used. We will set the exchange options in the “Specify Exchange Server settings” section.

    outlook2

    Notice for the “User Name” we are using %UserName%. This will enable Outlook to automatically use your domain username to log onto the specified Exchange Server.

    Also on this page we are able to specify the cached exchange mode settings.

    So now that we have made the configuration settings we will go to file/save, and save the OCT customization as an MSP file. I have saved mine as Custom.msp. I will add custom.msp to the updates folder of my Office 2007 installation source. Now the custom.msp that was just created and the MSP files from Sp2 are in the updates folder.

    updates

    We are ready to install Office 2007 ProPlus with our customizations. You may have noticed that we didn’t input a product key in the OCT. We did put it in the config.xml however, so for this walkthrough we will be using both the config.xml and the custom.msp we created with the OCT.

    If we were going to use only a config.xml for the customization we would use this command line for the Office installation:

    setup.exe /config \\server\share\config.xml

    If we were going to use only a custom.msp for the customization we have two options. Either we could use the following command line:

    setup.exe /adminfile \\server\share\custom.msp

    Or we could simply place our custom.msp in the updates folder. Remember that any MSP files that are applicable to the installation will apply during the install. That includes our customization MSP that we created.

    It is also possible to call both the config.xml and the custom.msp via the command line at the same time. Here is an example of how that would look.

    setup.exe /config \\server\share\config.xml /adminfile \\server\share\custom.msp

    Since we have placed our custom.msp in the updates folder however (so it will apply automatically), all that is needed is the setup command that calls the config.xml.

    install


    After the installation is complete upon my initial launch of Office I find that my customizations have been applied as expected.

  • Customize Office 2007 by using the Config.xml

    If you are looking to customize Office 2007 you may be interested in using the config.xml for your customizations.

    Let’s break apart the config.xml and see what we can do with it.

    *note* this blog entry is a breakdown of this technet article. For more detailed information about any particular section check that article.

    Here are the contents of the config.xml for Office 2007 ProPlus in it’s default state:

    <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>

    -Points of Interest-

    1. If you are going to customize the config.xml it is important to remember that the config.xml is an XML document and as such there needs to be opening and closing tags or you could end up with a syntax error.

    In this example below you can see that < is the opening tag and /> is the closing tag.

    <USERNAME Value="Customer" />

    If we changed this line to read: <USERNAME Value="Customer" > we would end up with a syntax error.

    *Hint* Open your config.xml with internet explorer to check your syntax. If your file syntax is missing a tag you will get a message like so:

    config

    2. In a config.xml the starting <!-- and ending --> are comment lines. You must remove them if you want to use a particular line.

    -config.xml options-

    Let’s look at each line of the config.xml and discover the options we can set.

    <!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> –>

    The above line can be modified to specify the various options for the installation UI.

    Display Level=

    Level

    None

    No Setup UI is displayed. Setting Display Level="none" directs Setup to run a silent install (unattended install). See the Remarks section for more information.

     

    Basic

    Setup displays the Welcome screen, the Product Key (PIDKEY) page (if needed), the End-User License Agreement (EULA) page (if needed), a progress bar, and the completion notice (if allowed).

     

    Full (default)

    Setup displays all UI to the user.

    CompletionNotice=

    CompletionNotice

    Yes

    Only applies if Level is set to "Basic" or "None": Setup displays the completion notice.

     

    No (default)

    Only applies if Level is set to "Basic": Setup does not display the completion notice.

    SuppressModal=

    SuppressModal

    Yes

    Only applies if Level is set to "Basic": Setup does not display error messages and other dialog boxes that might interrupt the installation.

     

    No (default)

    Only applies if Level is set to "Basic": Setup displays errors and other dialog boxes as needed.

    AcceptEULA=

    AcceptEULA

    Yes

    The End-User License Agreement is accepted on behalf of the user. Setup does not display the EULA page.

     

    No (default)

    If Level is not set to "None", Setup displays the EULA page.

    NoCancel=

    NoCancel

    Yes

    If Level is set to "Full" or "Basic", disable the cancel button (X in upper-right corner of the progress dialog).

     

    No (default)

    If Level is set to "Full" or "Basic", allow the user to cancel the installation from the progress bar.

    NoteNote:

    In enterprise deployments, it is recommended that you set the Display level value to none to direct Setup to run a silent install, to prevent prompting users to enter information, and to prevent the installation from waiting for any user interaction, including when files are in use. Setting the Display Level value to none assumes that the SuppressModal and CompletionNotice attributes are silenced and that the end-user license agreement (EULA) is accepted. Administrators must also make sure that no Office applications are running during an installation of the 2007 Office system.

    If you set the Display level value to basic and SuppressModal to yes, users may be prompted if any Office files are in use. Setting Display level to none prevents prompting users in such cases. The SuppressModal attribute does not prevent files in use messages from displaying; only Display level set to none prevents their display.

    The Display element is used by Setup only if Setup finds the Config.xml file in the same folder as setup.exe, or if you specify the Config.xml file by using the Setup /config command-line option. If Setup uses the Config.xml file in the product folder, then Setup uses the default display options.

    So if we modify want to ensure that the Office installation is silent to the end user, Auto accepts the EULA, doesn’t display a completion notice, and ensures that popups or other dialog boxes don’t come up to interrupt the installation we would modify the “display” line to read:

    <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />

    -----------

    The next line in the config.xml is the logging line. The default line looks like this:

    <!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Professional Plus Setup(*).txt" /> –>

    This line is used to specify the logging type, the location of the log file, and the template name of the log file.

    Logging type=

    Type

    Off

    Setup does no logging.

     

    Standard (default)

    Setup writes installation information to the log file.

     

    Verbose

    Setup writes all installation information to the log file.

    Path=

    Path

    Path

    The fully qualified path to the folder used for the log file. You can use environment variables. Default is %temp%.

    Template=

    Template

    filename.txt

    The name of the log file. If you insert the string * anywhere in the file name, a unique log file is created for each installation performed by Setup.exe (see the explanation below). If * is not included and the file name specified already exists, log information is appended to the existing file. The .txt file extension must be included. The default template is SetupExe(*).log.

    So if we want to ensure that the Office installation creates a verbose log file that is placed in the root of c:\, with a name of “Office_install.log” we would modify this line like so:

    <Logging Type="verbose" Path="c:\" Template="Office_2007.log" /> 

    I would always recommend setting the logging type to verbose. If you have a failure during the install, a verbose log file will offer much more information than a standard log.

    -----------

    The next line in the config.xml is the PIDKEY line. The default line looks like this:

    <!-- <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" /> --> 

    Simple enough. This is where you could place your valid product key for the installation to accept it automatically.

    If configured we would remove the comment lines and it would look like so:

    <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" />

    -----------

    The next three lines in the config.xml are used to set the username, company name, and installation location. Pretty self explanatory. 

    <USERNAME Value="Customer" /> 
    <COMPANYNAME Value="MyCompany" /> 
    <INSTALLLOCATION Value="%programfiles%\Microsoft Office" />  

    ----------

    The next line is for setting up a “cacheonly” installation of Office 2007.

    The syntax is:

    <LIS CACHEACTION="CacheOnly" />
    or
    <LIS CACHEACTION="RemoveCacheOnly" />

    So what is the purpose of doing a cacheonly installation? This is used for staging. As an example, let’s say that you want to install Office on 100 computers, but you are concerned about the bandwidth required for the installation on that many machines. You could “stage” by using cacheonly. What you might do is setup the installation to “cacheonly” on 25 machines today, 25 tomorrow, 25 the next day, etc… Then after all the machines have cached the installation of Office 2007 at a later date you could push the command:

    C:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\setup.exe /adminfile \\server\share\custom.msp

    *note* in this example I am using ProPlus. If we were using a different version of Office the Guid would be different.

    This is handy because then all 100 machines would install Office at the same time from their local source. This would help remedy concerns with bandwidth utilization.

    ----------

    The next two lines are is for setting up a sourcelist, and a distribution point.

    SOURCELIST, is a list, separated by semicolons, of one or more network installation points that contain the installation files for the product

    Syntax would be:

    <SOURCELIST Value="\\server1\share\Office12;\\server2\share\Office12" />  

    DISTRIBUTIONPOINT, specifies the fully qualified path to the network installation point from which the installation is to run.

    Syntax would be:

    <DistributionPoint Location="\\server\share\Office12" />

    NoteNote:

    The DistributionPoint element is used by Setup only if Setup finds the Config.xml file in the same folder as setup.exe, or if you specify the Config.xml file using the Setup /config command-line option. If Setup uses the Config.xml file in the product folder, it ignores this element because the network installation point has already been found.

    ----------

    The next line is for setting optionstates. This line can be used to prevent/allow features from installing. To perform this you need to know the name of the option state. For a list of option states review this technet article. 

    OptionState element

    Specifies how specific product features are handled during installation.

    clip_image001Important:

    In most situations, it is recommended that you use the OCT to change the installation state of features. The equivalent option in the OCT is Set feature installation states.

    Attributes

    Attribute

    Value

    Description

    Id

    optionID

    An item that the user can choose to install.

    State

    Absent

    The feature is not installed.

     

    Advertise

    The feature is installed the first time it is used.

     

    Default

    The feature returns to its default installation state.

     

    Local

    The feature is installed on the user's computer.

    Children

    force

    All child features of the feature are set to the specified state.

    Remarks

    A feature is an item that the user can choose to install. The Id value for a feature is defined in the Option element of the Setup.xml file in the core product folder.

    For a list of OptionState Id Values, see Config.xml file OptionState Id values. For information about modifying the OptionState element in Config.xml, see the Modifying the Config.xml File OptionState element section in Use Group Policy Software Installation to deploy the 2007 Office system.

    So for example, let’s say that we want to prevent Word from installing. We could use the following syntax:

    <OptionState Id="WORDFiles" State="absent" Children="force" /> 

    This would ensure that the Word feature would be absent (not installed), and the subfeatures under the Word tree would follow the absent state.

    ----------

    The next line is for specifying whether or not you want the computer to reboot after the installation is complete.

    *note* The default line in the config.xml has incorrect syntax.

    The correct syntax for this line should be:

    <Setting Id="SETUP_REBOOT" Value="IfNeeded" />

    The options for the value are:

    AutoAlways--Always initiate a reboot. Do not prompt the user.
    Always--Always prompt for a reboot at the end of setup.
    IfNeeded--Prompt for a reboot at the end of setup if setup requires a reboot. (Default)
    AutoIfNeeded--Initiate a reboot if setup requires a reboot. Do not prompt the user.
    Never--Never initiate or prompt for a reboot.

    So if we wanted to prevent a reboot after the installation we would use:

    <Setting Id="SETUP_REBOOT" Value="Never" />

    ----------

    The last line in the config.xml is used for chaining additional installations during the install of Office 2007. Rather then include the details of this line here, please review this blog entry for further information on chaining via the config.xml

    ------------------------------------------------------------------------------

    So now we have learned what options can be configured in the config.xml. To call your config.xml during your office installation, use the following syntax:

    \\server\share\setup.exe /config \\server\share\proplus.ww\config.xml

    *note* You can use this with the custom msp by using syntax like so:

    \\server\share\setup.exe /adminfile \\server\share\custom.msp /config \\server\share\proplus.ww\config.xml

    Remember that if you call both the config.xml and the custom.msp in your installation line, and there is a conflicting configuration setting, the config.xml will take precedence.

  • How to chain additional addins, or programs when deploying Office 2007. Chaining getting started tabs in this example.

    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. 

  • Capture1 

    Since I will be laying the addins down to the C:\Program Files\Microsoft Office\ location in my example, I will need to change the syntax in the config.xml to accommodate for the new path. Also because C:\Program Files\Microsoft Office\ contains spaces the previous example would fail without some syntax modification.

    Here are the lines I will be using in the config.xml now. (Notice the “ and ‘ to make up for the spaces in the destination path)

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

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

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

    Now when I install Office 2007 ProPlus using the custom.msp that I created with the files added to the “add files” section as above, and the config.xml has been modified with these latest 3 lines to point the addin installs to C:\Program Files\Microsoft Office\. The addins are successfully chained during the Office 2007 install.

    Related articles
    ==========
    Sequentially install multiple products of the 2007 Office system
    http://technet.microsoft.com/en-us/library/cc179200.aspx