Customize Office 2007 by using the Config.xml

Customize Office 2007 by using the Config.xml

  • Comments 1
  • Likes

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.

Comments
  • Thanks Mate..

    Good run through....

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment