Updated: 2008-09-19
In this article:
This article provides information about maintaining and customizing a 2007 Microsoft Office system installation. The 2007 Office system 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 configure options such as the following in Config.xml:
-
Specify the path of the network installation point.
-
Select the products to install.
-
Customize Setup options, including 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), part of the Setup program, 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 section, which is used to specify default installation location and default organization name, additional network installation sources, product key, license terms, display level, earlier versions of Office to remove, custom programs to run during installation, security settings, and Setup properties.
-
Features section, which is used to configure user settings and customizes which Office features are installed.
-
Additional content section, which is used to add or remove files, add or remove registry entries, and configure shortcuts.
-
Outlook section, which is used to customize a user's default Outlook profile, specify Exchange settings, add accounts, remove accounts and export settings, and specify Send\Receive groups.
-
-
Setup command-line options Setup.exe command-line options can also be used for maintenance, repair, and uninstall operations. The Setup.exe command-line options are limited; however, you can use the OCT to configure Setup properties and configure other customizations.
Using the Config.xml file for maintenance
The Config.xml file is not installed or cached on users' computers; it is used only while running Setup. 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 Pro.WW folder installs Microsoft Office Professional 2007.
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 lets Setup know which product you want to modify. The /config command uses the following syntax:
/config [path]
For example, to run Setup.exe with the /config command, type:
\\server\share\Office12 \setup.exe /config \\server\share\Office12\Pro.WW\Config.xml
where:
Office12 is the root of the network installation point.
You can use the Config.xml file for the following post-installation tasks:
-
Maintenance Mode operations (Add or Remove Features)
-
Repair
-
Remove
In this section:
Modify the Config.xml file
The following procedure illustrates how to modify the Config.xml file for Office Enterprise 2007.
Modify the Config.xml file
-
Use Windows Explorer to browse to the \\server\share\Office_2007\Enterprise\Enterprise.WW 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 specify Display Level to turn off the Setup user interface, hide error messages and other dialog boxes, and accept the Microsoft Software License Terms (this is referred to as "Eula" in the AcceptEula attribute of the Display element), locate the line in the Config.xml file that contains the Display element:
<!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
Make the Display modifications:
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
Similarly, if you wanted to turn on verbose logging and store the log files in the AppInst folder, you would locate the line that contains the Logging element in the Config.xml file and make the following changes:
<Logging Type="verbose" Path="%temp%\Log\AppInst\Office2007" Template="Microsoft Office 2007 Enterprise Setup(*).txt" />
To set a feature state to 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 Office Access 2007. To uninstallOffice Access 2007, locate the line that contains the OptionState element in the Config.xml file 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 you are installing. For example, if you are installing Microsoft Office Enterprise 2007, the file is Enterprise.WW\setup.xml. For more information about the OptionState Id values for the applications installed with Office Enterprise 2007, see Config.xml file OptionState Id values. For more information about the Config.xml file, see Config.xml file in the 2007 Office system.
Configure different feature states in the Config.xml file
If your 2007 Office system 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 2007 only. To use a different 2007 Office system product, specify the productID that you want in the value for Configuration Product. For example, use "Enterprise" for the Office Enterprise 2007 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, Enterprise.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 Enterprise 2007 contains the following line with Setup Id="Enterprise", where Enterprise is the ProductID:
- <Setup Id="Enterprise" Type="Product"
ProductCode="{90120000-0030-0000-0000-0000000FF1CE}">
Copy Code | |
---|---|
<Configuration Product="ProPlus"> <OptionState Id="ACCESSFiles"State="absent"Children="force" /> <!-- Access --> <OptionState Id="EXCELFiles" State="local"Children="force" /> <!-- Excel --> <OptionState Id="OUTLOOKFiles" State="local"Children="force" /> <!-- Outlook --> <OptionState Id="PPTFiles"State="local"Children="force" /> <!-- PowerPoint --> <OptionState Id="PubPrimary" State="absent"Children="force" /> <!-- Publisher --> <OptionState Id="SHAREDFiles"State="local"Children="force" /> <!-- Office Shared Features --> <OptionState Id="TOOLSFiles" State="local"Children="force" /> <!-- Office Tools --> <OptionState Id="VisioPreviewerFiles" State="local"Children="force" /> <!-- Visio Viewer --> <OptionState Id="WORDFiles"State="local"Children="force" /> <!-- Word --> <OptionState Id="XDOCSFiles"State="absent"Children="force" /> <!-- InfoPath --> </Configuration> |
Using the OCT for maintenance
Administrators can run the OCT to make changes to existing installations. To do this, use Windows Explorer to browse to the location of 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.
In this section:
Prepare to deploy MSP customization files
This section discusses important issues related to deploying international languages, and MSP patch sequencing behavior that you should consider when you work with MSP customization files.
Deploying additional languages
If you are deploying additional languages as part of your customizations, you must first copy all the 2007 Office system Language Packs that you want to deploy to the network installation point that contains the Office product files; for example, \\server\share\Office12. 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 this change. Therefore, you must also re-create the customization MSP file that you want to deploy to users if you update the installation source with additional languages. Failure to do this might cause unexpected behavior because the changes to the customization MSP file will not apply to the added languages. For information about the products that a given MSP patch updates, see Determining which 2007 Office system products are updated by an OCT MSP customization patch.
Using the Updates folder
The Updates folder is used only for initial or new installations of the 2007 Office system. The Updates folder can contain initial or baseline OCT MSP patches, OCT MSP maintenance patches and service packs and hotfixes that are in .msp formats only. 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 to the location 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:
<SetupUpdates CheckForSUpdates="Yes" SUpdateLocation= "<path1>;<path2>" />
where:
CheckForSUpdates="Yes" indicates that Setup uses the path list in SUpdateLocation to find Setup customization files.
SUpdateLocation lists the fully qualified paths to the folders that contain the Setup customization files, separated by semicolons.
For more information about the SetupUpdates element, see Config.xml file in the 2007 Office system.
Understanding MSP patch sequencing behavior
Every time you save a customization MSP file in the OCT, the tool updates the customization file's patch sequencing number with the current computer date and time stamp and generates a new patch globally unique identifier (GUID). 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 patches:
-
An OCT MSP named "uninstall-access.msp" in which you set Office Access 2007 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 patches you create thereafter. This MSP file gets sequenced first and the Office Access 2007 feature is set to Not Available on users' computers.
-
An OCT MSP named "install-access.msp" in which you set Office Access 2007 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 gets sequenced later than the first OCT MSP, "uninstall-access.msp"; therefore, the Office Access 2007 feature is set to Run All from My Computer on users' computers.
Obtaining patch sequence information from an Office 2007 customization patch
The customization MSP file's time stamp is part of the SummaryInfo patch title. To identify the patch sequence information from a 2007 Office system customization patch, you can use the sample Microsoft Visual Basic script (.vbs) 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/?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:
-
Windows Script Host Basics (http://go.microsoft.com/fwlink/?LinkId=100317)
-
Running Your Scripts (http://go.microsoft.com/fwlink/?LinkId=100319).
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 OCTPatchSequenceInfo.vbs. You can store the script anywhere on your computer.
Copy Code | |
---|---|
' Utility to extract the patch sequence information from an Office 2007 customization patch ' For use with Windows Scripting Host, CScript.exe or WScript.exe ' Copyright (c) 2008, Microsoft Corporation. All rights reserved. Const PID_TITLE = 2 Const MSIOPENDATABASEMODE_READONLY = 0 Dim oMsi, SumInfo, sTitle If Not wscript.arguments.count = 1 Then Wscript.Echo "Office 2007 OCT Patch Sequence Number" & _ vbNewLine & "You must supply the location of the Office 2007 customization patch " & _ vbNewLine & _ vbNewLine & "Copyright (C) 2008, Microsoft Corporation. All rights reserved." Wscript.Quit 1 End If Set oMsi = CreateObject("WindowsInstaller.Installer") Set SumInfo = oMsi.SummaryInformation(wscript.arguments(0), MSIOPENDATABASEMODE_READONLY) sTitle = SumInfo.Property(PID_TITLE) wscript.echo Mid(sTitle,30,20) |
Run the OCTPatchSequenceInfo.vbs script
-
Use Windows Explorer to open the folder that contains the OCTPatchSequenceInfo.vbs file.
-
To run the script, drag the 2007 Office system OCT MSP patch that you want to use onto the OCTPatchSequenceInfo.vbs script that is displayed in the Windows Explorer window.
-or-
-
Click Start, click Run, and then type cmd.
-
In the Command Prompt window, type:
cscript <script path> \OCTPatchSequenceInfo.vbs <OCT MSP path and file name>
-or-
wscript <script path> \OCTPatchSequenceInfo.vbs <OCT MSP path and file name>
If you run the script with Cscript, the output is listed in the Command Prompt window. If you run the script by using Wscript, a message box that contains the output is displayed.
Identify which products are installed
To identify which 2007 Office system products are installed in Windows Vista computers, use Programs and Features in Control Panel before you modify options for installed Office products. In Windows XP, use Add or Remove Programs in Control Panel. Then when you run the OCT to make changes to an existing Office installation, you must select the same Office product as the one installed on the client computers from the list of products listed in the Select a Microsoft Office product dialog box.
For example, assume that the client computers have the Office Enterprise 2007 product installed and that you must make a configuration change to settings for Microsoft Office Outlook 2007 profiles. When you run the OCT to modify the MSP customization file, you must select the Office Enterprise 2007 product (which is the installed Office product) from the list in the Select a Microsoft Office product dialog box, and then make your configuration changes. If you do not select the same product as the one installed in client computers, the updated MSP patch might not install 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."
Modify an MSP customization file
The following example illustrates how to modify an existing MSP file, and assumes that Microsoft Office Professional 2007 is already installed.
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 Office Access 2007 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 Office Access to Not Available.
-
When you finish making your customizations, select Save As... in the File menu.
-
Specify a unique name for the file with 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 NoAccesss.msp to a folder in \\server\share\Office_2007\Professional\Patches.
For detailed information about the OCT, see Office Customization Tool in the 2007 Office system.
Determine which 2007 Office system products are updated by an OCT MSP customization patch
Customizations 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 patch.
To run the .vbs script, use Microsoft Windows Script Host (http://go.microsoft.com/fwlink/?LinkId=100317) either from the Windows desktop by using WScript.exe, from 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.
Copy Code | |
---|---|
' Utility to extract the patch target information from an Office 2007 customization patch ' For use with Windows Scripting Host, CScript.exe or WScript.exe ' Copyright (c) Microsoft Corporation. All rights reserved. ' Dim oMsi, oMsp, View, Record Dim arrMspTargets, sTarget, sMetadata, sOutput Dim iStart Const MSIOPENDATABASEMODE_PATCHFILE = 32 Const PID_TEMPLATE = 7 Const MSIREADSTREAMBYTES = 1 Const OFFSET = 13 If Not wscript.arguments.count = 1 Then Wscript.Echo "Office 2007 OCT Patch Targets utility" & _ vbNewLine & " You must supply the location of the Office 2007 customization patch " & _ vbNewLine & _ vbNewLine & "Copyright (C) Microsoft Corporation. All rights reserved." Wscript.Quit 1 End If Set oMsi = CreateObject("WindowsInstaller.Installer") On Error Resume Next Set oMsp = oMsi.OpenDatabase(WScript.Arguments(0),MSIOPENDATABASEMODE_PATCHFILE) Set View = oMsp.OpenView("SELECT * FROM _Streams WHERE `Name`='metadata' ") If Not Err = 0 Then Wscript.Echo "Failed to read from OCT .msp file: " & WScript.Arguments(0) Wscript.Quit 1 End If On Error Goto 0 View.Execute Set Record = View.Fetch If Not Record Is Nothing Then sMetadata = Record.ReadStream(2, Record.DataSize(2), MSIREADSTREAMBYTES) arrMspTargets = Split(oMsp.SummaryInformation.Property(PID_TEMPLATE),";") For Each sTarget in arrMspTargets iStart = 0 : iStart = InStr(sMetadata,"<Property id="&chr(34)&"ProductCode"&chr(34)&" value="&chr(34)&sTarget) iStart = InStrRev(sMetadata,"<Package id=",iStart) + OFFSET iEnd = 0 : iEnd = InStr(iStart,sMetadata,chr(34)) sOutput = sOutput & sTarget & vbTab & Mid(sMetadata,iStart,iEnd-iStart) & vbCrLf Next WScript.Echo sOutput |
Run the OctPatchTargets.vbs script
-
Use Windows Explorer to open the folder that contains the OctPatchTargets.vbs file.
-
To run the script, drag the 2007 Office system OCT MSP patch that you want to use onto the OctPatchTargets.vbs script that is displayed in the Windows Explorer window.
-or-
-
Click Start, click Run, and then type cmd.
-
In the Command Prompt window, type:
cscript <script path>\ OctPatchTargets.vbs <OCT MSP path and file name>
-or-
wscript <script path>\ OctPatchTargets.vbs <OCT MSP path and file name>
If you run the script with Cscript, the output is listed in the Command Prompt window. If you run the script by using Wscript, a message box that contains the output is displayed.
Install the MSP customization patch
Setup customization files created by the OCT 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 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
Using Setup command-line options for maintenance
Administrators can run Setup in Maintenance Mode (MMode) by doing one of the following:
-
Running Setup.exe from the original installation source.
-
Running Setup.exe from the installed root folder for all the setup-specific files, as in the following example:
"%commonprogramfiles%\Microsoft Shared\Office12\Office Setup Controller"
In this section:
Run Setup.exe in Maintenance Mode
You can run Setup.exe from the original installation source. Setup may be in a single product, multi-language product, or in a multi-product share. Setup searches for multiple products present on the share before displaying 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 to the original installation source: \\server\share\Office12\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 with checked checkboxes. It also shows all available languages for the product with unchecked checkboxes, indicating the languages that are not yet installed. Making your selections and pressing Continue, commits the changes to the installation.
-
Repair. This option initiates a reinstallation of the product, including verification, and repair if 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 removes the entire product and all associated language packs.
You can use Setup.exe command-line options to perform the following maintenance tasks:
Modify an existing installation
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, Enterprise.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 illustrates how to modify an installation by using the /modify command. Office12 is the root of the network installation point:
\\ server\share \Office12\setup.exe /modify Enterprise
Repair an existing installation
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 illustrates how to use the /repair command to repair an Office Enterprise 2007 installation. Office12 is the root of the network installation point:
\\ server\share \Office12\setup.exe /repair Enterprise
In enterprise deployments, it is recommended 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, including when files are in use.
To configure a silent repair of a 2007 Office system 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.
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:
<!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
-
Modify the Display element entry with the silent options that you want to use. For example, use the following syntax:
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
-
Save the Config.xml file as SilentRepairConfig.xml.
For example, to repair Microsoft Office Professional Plus 2007 after you modify the Config.xml file to specify silent options, use the following command where \\server\share\Office12\ProPlus is the path to the Office Professional Plus 2007 source files and <pathtoSilentRepairConfig.xml> is the location of your modified Config.xml file for Office Professional Plus:
\\server\share\Office12\ProPlus \setup.exe /repair ProPlus /config <pathtoSilentRepairConfig.xml>\SilentRepairConfig.xml
Uninstall a product
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 illustrates how to use the /uninstall command to remove an Office Enterprise 2007 installation. Office12 is the root of the network installation point:
\\ server\share \Office12\setup.exe /uninstall Enterprise
In enterprise deployments, it is recommended that you run a silent uninstall, as mentioned previously. To run a silent uninstallation of a 2007 Office system 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 Office Visio Professional 2007 after you modify the Config.xml to set silent options, use the following command where \\server\share\Office12\VisPro is the path to the Visio Professional source files, and <pathtoUninstallConfig.xml> is the location of your modified Config.xml file for Visio Professional:
\\server\share\Office12\VisPro \setup.exe /uninstall VisPro /config <pathtoUninstallconfig.xml>\UninstallConfig.xml
For more information about Setup.exe commands, see Setup command-line options for the 2007 Office system.