Best practices for maintaining Office 2010

You can maintain and customize a Microsoft Office 2010 installation by using any of the methods that are described in this article.

Office 2010 provides the following methods for customizing and maintaining Office installations:

Config.xml The Config.xml file is used to configure installation tasks. If you are using both a Setup customization .msp file and a Config.xml file to customize Office, the customizations that you define in Config.xml take precedence over those in the customization .msp file. You can use the Config.xml to configure options such as the following:

Specify the path of the network installation point.

Select the products to install.

Customize Setup options. These include logging and the location of the Setup customization file and software updates.

Specify installation options, such as user and company name.

Copy the local installation source (LIS) to the user's computer without installing Office.

Add or remove languages from the installation.

Office Customization Tool The Office Customization Tool (OCT) is part of the Setup program and is the primary tool for most customizations. The OCT saves customizations in a Setup customization (.msp) file, which is applied at either Setup time or during a Maintenance Mode operation. The OCT is used to customize the following areas:

Setup command-line options Setup.exe command-line options can also be used for maintenance, repair, and uninstall operations. However, the Setup.exe command-line options are limited. You can use the OCT to configure Setup properties and configure other customizations.

The Config.xml file is not installed or cached on users' computers. It is used only while Setup runs. Administrators can edit the Config.xml file to make additional customizations to the installation. By default, the Config.xml file that is stored in the core product folder directs Setup to install that product. For example, the Config.xml file in the ProPlus.WW folder installs Microsoft Office Professional Plus 2010.

Use /config on the Setup command line to point to the location of the default Config.xml file for a product or to point to a custom Config.xml file. If you use /config for a product that is already installed, that indicates to Setup which product to modify. The /config command uses the following syntax:

The following procedure shows how to modify the Config.xml file for Office 2010 (Office Professional Plus 2010 in this example).

To Modify the Config.xml file

Use Windows Explorer to browse to the \\server\share\Office_2010\ProfessionalPlus\ProPlusWW directory.

Open the Config.xml file by using a text editor such as Notepad. To do this, right-click the Config.xml file, click Open With, and then select Notepad.

Modify the Config.xml file, and save the file when you complete your customizations. The following sections provide examples of Config.xml file customizations.

To configure Display Level to turn off the Setup user interface, hide error messages and other dialog boxes, and accept the Microsoft Software License Terms, locate the line in the Config.xml file that contains the Display element.

Note

The license terms are called "Eula" in the AcceptEula attribute of the Display element.

Similarly, if you want to turn on verbose logging and store the log files in the AppInst folder, locate the line that contains the Logging element in the Config.xml file and make the following changes:

To set a feature to be uninstalled, you can specify the OptionState element in the Config.xml file to uninstall the feature on the user's computer and set child features of the feature to the same specified state. This example uses Microsoft Access 2010. To uninstall Access 2010, locate the line that contains the OptionState element and make the following changes. Note that this is case-sensitive:

<OptionState Id=”ACCESSFiles” State=”absent” Children=”force” />

The OptionState element of the Config.xml file provides options for specifying how individual product features are handled during installation. The value for the Id attribute of the OptionState element is located in the Setup.xml file in the product folder of the product that you are installing. For example, if you are installing Microsoft Office Professional Plus 2010, the file is ProPlus.WW\setup.xml. For more information about the OptionState Id values for the applications installed with Office Professional Plus 2010, see Config.xml file OptionState ID values for Office 2010. For more information about the Config.xml file, see Config.xml file in Office 2010.

If your Office 2010 deployment requires you to configure different feature states for multiple groups of users, you can use the OptionState element in the Config.xml file to specify the feature states. To do this, you can customize the Config.xml file for the Office product that you are deploying as shown in the following example. The example in this section works for Microsoft Office Professional Plus 2010 only. To use a different Office 2010 product, specify the productID that you want in the value for Configuration Product. For example, use "ProPlus" for the Office Professional Plus 2010 product.

ProductID values are included in the Setup.xml file, which is located in the core product folder (core_product_folder_name.WW folder, for example, ProPlus.WW) on the network installation point. In the Setup.xml file, [ProductID] is equal to the value of the Id attribute of the Setup element.
For example, the Setup.xml file for Office Professional Plus 2010 contains the following line with Setup Id="ProPlus", where ProPlus is the ProductID:

Administrators can run the OCT to change existing installations. To do this, use Windows Explorer to locate (use Browse) the existing Office installation that you want to modify, and then run Setup.exe /admin. You have the option of selecting an existing .msp file to update, or creating a new .msp file. You can save the new or updated .msp file to a custom directory and then you can use a Windows Installer command line to install the .msp patch.

If you are deploying additional languages as part of your customizations, you must first copy all the Office 2010 Language Packs that you want to deploy to the network installation point that contains the Office product files as in the following example:

\\server\share\Office14

A static list of the products that are contained in the installation source is built only during the initial creation of a customization patch. If you add more languages to the installation source later, the existing customization patch is not updated to reflect such changes.

In Office 2010, if you create an initial Setup customization file (.msp file) to customize the installation (for example, for Microsoft Office Professional Plus 2010) and later decide to add languages, you can use the Import option in the OCT to apply the language changes. In such cases, you must first add the language packs to the network installation point that contains the Office product source files (Microsoft Office Professional Plus 2010 in this example). Then, you run the OCT from the root of the network installation point and create a new Setup customization file for the same product, and import the original customization .msp file that you created previously for Office Professional Plus 2010. For instructions, see Import languages to an existing installation in Import an Office 2010 Setup customization file.

The Updates folder is used only for initial or new installations of Office 2010. The Updates folder can contain initial or baseline OCT .msp customization files, and service packs and hotfixes that are in .msp formats only.

Important

You can put only one customization .msp file for each Office 2010 product that you are installing in the Updates folder for an initial installation. You must deploy the rest of the customization .msp files for a product after the Office installation is complete. Only one Setup customization file per product in the Updates folder is supported.
If you are deploying an initial installation of Office 2010 and you also want to deploy Office 2010 software updates, such as service packs and hotfixes, Setup can apply the product updates as part of the installation process. You can place the Office 2010 product updates in the Updates folder. In scenarios such as this where the Updates folder includes both one Setup customization .msp file and product updates, Setup applies only the Setup customization .msp file during the initial installation. Product updates are applied after the installation is complete.

For initial installations, as an alternative to placing the setup customization .msp file in the Updates folder, you can use the Setup command-line option /adminfile to specify the fully qualified path of the setup customization .msp file. For example, type:

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

Another option for initial installations is to use the SetupUpdates element in the Config.xml file, as shown in the following example:

SUpdateLocation lists the fully qualified paths to the folders that contain the Setup customization files, separated by semicolons. Note that you must not use environment variables in a path. If an environment variable is used in a path, Setup ignores update files that are located in the specified path location.

Every time that you save a customization .msp file in the OCT, the tool updates the patch sequencing number of the customization file with the current computer date and time stamp and generates a new patch globally unique identifier (GUID). After initial installation, the OCT .msp files are applied chronologically according to their time stamp.

To illustrate the sequencing behavior, let us assume that you have created the following OCT .msp maintenance files:

An OCT .msp file that is named "uninstall-access.msp" in which you set Microsoft Access to Not Available. This file is saved first so it has a lower patch sequence number and an older date and time stamp than other OCT customization .msp files that you create after that. This .msp file is sequenced first and the Microsoft Access feature is set to Not Available on users' computers.

An OCT .msp file that is named "install-access.msp" in which you set Microsoft Access to Run All from My Computer. This file is saved last so it has a higher patch sequence number and a newer date and time stamp. This .msp file is sequenced later than the first OCT .msp file, "uninstall-access.msp"; therefore, the Microsoft Access feature is set to Run All from My Computer on users' computers.

The customization .msp file’s time stamp is part of the SummaryInfo patch title. To find the patch sequence information in an Office 2010 customization file, you can use the sample Microsoft Visual Basic script (.vbs) that is provided in this section to view the time stamp information. The time stamp represents the time in Coordinated Universal Time (UTC) and the format of the time is as follows: YYYY.MMDD.hhmm.sssss. For information about UTC, see GetSystemTime Function (http://go.microsoft.com/fwlink/p/?LinkId=127840) on the MSDN Web site.

To run the script, use Microsoft Windows Script Host (WSH), a language-independent scripting host for Windows Script-compatible scripting engines. WSH lets you run scripts from both the Windows desktop and a command prompt:

To run scripts from Windows, WScript.exe provides a Windows-based dialog box for setting script properties.

To run scripts from a command prompt, CScript.exe provides command-line switches for setting script properties.

WSH also provides drag-and-drop support for scripts. This means that you can drag files onto a WSH script. The file names are translated into arguments on the command line. For more information about WSH, see the following resources on the MSDN Web site:

To save the script sample, open a text editor such as Notepad, and copy and paste the script code in this section to a file. Save the script file as PatchSequenceInfo.vbs. You can store the script anywhere on your computer.

To determine which Office 2010 products are installed in computers that are running Windows 7 and Windows Vista, use Programs and Features in Control Panel before you modify options for installed Office products. Then, when you run the OCT to modify an existing Office installation, you must select, from the list of products that are listed in the Select a Microsoft Office product dialog box, the same Office product as the one that is installed on the client computers.

For example, assume that the client computers have the Office Professional 2010 product installed and that you must make a configuration change to settings for Microsoft Outlook 2010 profiles. When you run the OCT to modify the .msp customization file, you must select the Office Professional 2010 product (which is the installed Office product) from the list in the Select a Microsoft Office product dialog box. Then, you can make your configuration changes. If you do not select the same product as the one that is installed in client computers, the updated .msp patch might not be installed and an error message such as the following might be displayed:

"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."

The following example shows how to modify an existing .msp file, and assumes that Office Professional 2010 is already installed.

To modify an .msp file

From the root of the network installation point, run the following command line to start the Office Customization Tool: \\server\share\setup.exe /admin.

In the Select Product dialog box, click Open an existing Setup customization file, and then click OK. Or click Create a new Setup customization file for the following product to create a new OCT maintenance patch from scratch.

In the Open dialog box, select the .msp customization file that you want to modify, and then click Open.

In the left pane of the OCT window, select an area of customization and configure the options available in the right pane. For example, to remove Access 2010 from the installation, select Set feature installation states in the left pane. In the right pane, expand Microsoft Office and change the installation option for Microsoft Access to Not Available.

When you finish making your customizations, select Save As in the File menu.

Specify a unique name for the file that has an .msp file name extension, and then click Save.

You can save the .msp file to a custom folder. For example, save the file as NoAccess.msp to a folder in \\server\share\Office_2010\ProPlus\Patches.

Customizations that are made with the OCT are saved in a Setup customization file (.msp file) that uses Extensible Markup Language (XML) format. This section provides a sample Microsoft Visual Basic script (.vbs) that administrators can use to determine which products are updated by a given OCT .msp customization file.

To run the .vbs script, use Microsoft Windows Script Host (http://go.microsoft.com/fwlink/p/?LinkId=100317) either from the Windows desktop by using WScript.exe, at the command prompt by using CScript.exe, or by dragging the OCT .msp patch files onto the .vbs script.

To save the script sample, open a text editor such as Notepad, and copy and paste the script code in this section to a file. Save the script file as OctPatchTargets.vbs. You can store the script anywhere on your computer.

Maintenance OCT Setup customization .msp files (created after initial installation of Office 2010) are Windows Installer patch packages (.msp files) that you can apply to users' computers just as you would a software update. The Office installation is modified based on the customizations that you specify in the .msp file.

Users can apply maintenance Setup customization files by either double-clicking the .msp file or by running Msiexec.exe with the /p command-line option as shown in the following example:

msiexec.exe /p \\server\share\custom.msp

where:

/p applies a patch

\\server\share indicates the path of the shared folder that contains the .msp file

For information about Windows Installer, see the following resources on the MSDN Web site:

You can run Setup.exe from the original installation source. Setup may be in a single product, multilanguage product, or in a multi-product share. Setup searches for multiple products that are present on the share before it displays any user interface. If Setup finds multiple products, the Select a Microsoft Office product dialog box is presented so you can select a product.

To run Setup, use the following command, indicating the path of the original installation source: \\server\share\Office14\setup.exe.

The following maintenance options are available:

Add/Remove Features. This option presents a window with the Language and Installation Options tabs and lets you change option states and the default language (if more than one language is installed). The Language tab indicates all the installed languages by using checked checkboxes. It also shows all available languages for the product with unchecked checkboxes, which indicate the languages have not yet been installed. Making your selections and pressing Continue commits the changes to the installation.

Repair. This option begins a reinstallation of the product, which includes verification, and repair if they are necessary, of the local installation source (LIS). Only a progress bar and completion notice are displayed.

Remove. This option displays a dialog box where you are prompted about removing the product. Selecting Yes completely removes the product and all associated language packs.

You can use Setup.exe command-line options to perform the following maintenance tasks:

To run Setup.exe in maintenance mode to modify an existing Office installation, you can use the /modify command-line option, which uses the following syntax:

/modify [ProductID]

where:

[ProductID] is the value for the product that you want to modify. As mentioned previously, ProductID values are included in the Setup.xml file which is located in the core product folder (core_product_folder_name.WW folder, for example, ProPlus.WW) on the network installation point. In the Setup.xml file, [ProductID] is equal to the value of the Id attribute of the Setup element.

The following example shows how to modify an installation by using the /modify command. Office14 is the root of the network installation point:

To run Setup.exe to repair an installed Office product, use the /repair command-line option which uses the following syntax:

/repair [ProductID]

where:

[ProductID] is the value for the product that you want to modify. Look up the value of [ProductID] in the Setup.xml file for the product.

The following example shows how to use the /repair command to repair an Office Professional Plus 2010 installation. Office14 is the root of the network installation point:

\\server\share\Office14\setup.exe /repair ProPlus

In enterprise deployments, we recommend that you run silent repair and uninstall operations to prevent prompting users to enter information, and to prevent the repair or uninstall process from waiting for any user interaction, even when files are being used.

To configure a silent repair of a Office 2010 product that requires no user interaction, you must modify the Config.xml file for the product and set the Display element's Level attribute to "none" (Display Level="none"), and then save the Config.xml file as SilentRepairConfig.xml, as shown in the following procedure.

To specify silent installation options in Config.xml

Open the Config.xml file for the product that you are repairing by using a text editor tool such as Notepad.

Locate the line that contains the Display element, as shown in the following example:

For example, to repair Office Professional Plus 2010 after you modify the Config.xml file to specify silent options, use the following command where \\server\share\Office14\ProPlus is the path of the Office Professional Plus 2010 source files and <pathtoSilentRepairConfig.xml> is the location of your modified Config.xml file for Office Professional Plus:

To run Setup.exe to remove a specified Office product from the user’s computer, use the /uninstall command-line option, which uses the following syntax:

/uninstall [ProductID]

where:

[ProductID] is the value for the product that you want to modify. Look up the value of [ProductID] in the Setup.xml file for the product.

The following example shows how to use the /uninstall command to remove an Office Professional Plus 2010 installation. Office14 is the root of the network installation point:

\\server\share\Office14\setup.exe /uninstall ProPlus

In enterprise deployments, we recommend that you run a silent uninstall. To run a silent uninstallation of a Office 2010 product that requires no user interaction, you must modify the Config.xml file for the product that you want to uninstall and set the Display element's Level attribute to "none" (Display Level="none"), and then save the Config.xml file as UninstallConfig.xml.

For example, to uninstall Microsoft Visio Professional 2010 after you modify the Config.xml to set silent options, use the following command where \\server\share\Office14\VisPro is the path of the Visio Professional source files, and <pathtoUninstallConfig.xml> is the location of your modified Config.xml file for Visio Professional: