...Because someone's gotta tell the story...


To return to the main Blog List, click Full Blog Listing.


Batch File
Group Policy

Office 2010 Setup with Config.XML

Friday, January 21, 2011 in Technical Articles (Views: 5928)
Microsoft Office has evolved through the years to be a mainstay product. I remember the early 1990's where really I never thought software this bad would ever make it. Office endured, and became a much more sophisticated suite of apps.

One thing that does rattle me a bit is how Office 2007 and 2010 install. There is a tool called the OCT (Office Customization Toolkit) which is for Enterprise customers. This is, by far, the best tool available for installing and configuring Office. It allows you to set features, what is to be, and what is not to be installed. It also allows you to customize your settings in advance as well for each product as a preference (unlike Group Policy, later).

For those who are not Enterprise customers, there are still other ways to package and install Office in an unattended sense. You can either package this into an image (not recommended, repackaged with a third party packager (also not recommended), or use the Config.XML file for setup).

I never understood why the OCT couldn't be packaged into other versions such as Pro and Standard, since it would make life a lot easier. You can, however, leverage group policy to make setting changes, but be careful here - these options cannot be changed by users. If this is what you want, then great. If not, and you want users to have their own control of office, I will explain a little more in detail what you can do later. In a technical sense, the only difference between say, Enterprise and Pro is that there is a folder called Admin off of the install root, which carries the OCT files.

This file can be a little overbearing at first, but not too bad. It does not offer the features of OCT, but at least can assist in creating an unattended installation. Here is a basic config.xml file from Office 2010 Professional Plus. In my case, the config.xml is in the main product folder, at (InstallRoot)\ProPlusR.WW.

Disclaimer: I apologize for not being able to use proper HTML tags, as my blogs run on HTML. You will need to replace the ( with <, etc, as a copy and paste won't work.

(Configuration Product="ProPlusr")
(Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /)
(Logging Type="standard" Path="%temp%" Template="Microsoft Office Professional Plus Setup(*).txt" /)
(USERNAME Value="Customer"
(COMPANYNAME Value="MyCompany" /)
(INSTALLLOCATION Value="%programfiles%\Microsoft Office" /)
(LIS SOURCELIST="\\server1\share\Office;\\server2\share\Office" /)
(DistributionPoint Location="\\server\share\Office" /)
(OptionState Id="OptionID" State="absent" Children="force" /)
(Setting Id="SETUP_REBOOT" Value="IfNeeded" /)
(Command Path="%windir%\system32\msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /)

Note that everything is commented out here. The reason for this is that setup.exe will look for this file upon execution, and if it finds it, these settings will override any settings made in the OCT (which uses a MSP file).

Here is a sample of how I use my config.xml (scrubbed, of course). I also want to add the following steps are being made:

1. The install is unattended (I didn't make it silent for the purpose of the exercise). This would be most useful for installs from something like SCCM.
2. All necessary fields are populated (with generic data).
3. I wanted to show a couple of things. First, I didn't want PowerPoint to be installed, and wanted Access only to install on first run.
3. Install completes without a prompt at the end.

I will comment through the file.

(!-- We start by telling what the product is we are installing.
(Configuration Product="ProPlusr")

These next lines are saying what the user will see (if they are installing from setup.

Basic Display level will avoid most prompts. Full will ask for everything, even if the information is pre-populated.

Of course, turn off the completion notice, suppress dialog boxes, and when the EULA shows up, accept it for the user. Like anyone reads it anyway.

The next step is to tell it what kind of logging we are going to so and where to send the file. --)

(Display Level="Basic" CompletionNotice="no" SuppressModal="no" AcceptEula="Yes" /)
(Logging Type="standard" Path="%temp%" Template="Microsoft Office Professional Plus Setup(*).txt" /)

(!-- Here is all the basics - the product key, user name, etc. The PID must be inputted with no dashes or spaces, just the numbers and characters. In this case, I deeply apologize if anyone has this PID and is running Office. Actually, they can't.. :) --)

(PIDKEY Value="1234512345123451234512345" /)
(USERNAME Value="Valued Customer" /)
(COMPANYNAME Value="ACME Hardware” /)

(!-- Here, we get to some good stuff. Of course, where we install it, but also...

What we want installed. There are lists of what all these OptionState IDs mean, but real quickly, the finer points.

State: Will this be installed or not?
Local: Will install in the location path.
Advertise will install on first run.
Absent will not install (and will not show up on the local drive)

The Children option to Force means that the state will be enforced all the way down the tree for that product/feature. I encourage you to use this, as it is much easier than setting every individual option. --)

(INSTALLLOCATION Value="%programfiles%\Microsoft Office" /)
(OptionState Id="ACCESSFiles" State="Advertise" Children="force" /)
(OptionState Id="PPTFiles" State="Absent" Children="force" /)
(OptionState Id="OUTLOOKFiles" State="Local" Children="force" /)

(!-- Command is both a blessing and a curse. You can use this to set registry keys and office settings after install, if you don't want to use Group Policy. One such example is a batch file that I run. --)

(Command Path="\\server\share\folder\afteroffice.bat" /)


Related Blogs You May Be Interested In:

To leave a comment, please log in and/or register.