Office 部署工具的配置选项Configuration options for the Office Deployment Tool

借助 Office 部署工具 (ODT),可以下载并将 Office 365 专业增强版部署到客户端计算机。使用 ODT,可以更好地控制 Office 安装。也就是说,可以定义要安装的产品和语言、应如何更新这些产品,以及是否向用户显示安装体验。本文介绍了此工具中的所有选项。若要了解如何使用工具本身,请参阅 Office 部署工具概述With the Office Deployment Tool (ODT), you can download and deploy Office 365 ProPlus to your client computers. The ODT gives you more control over an Office installation: you can define which products and languages are installed, how those products should be updated, and whether or not to display the install experience to your users. This article covers all the available options in the tool. To learn how to use the tool itself, see Overview of the Office Deployment Tool.

备注

最佳做法: 本文中的选项显示了配置文件中的 XML 元素和属性。Best practice: The options in this article show the XML elements and attributes in the configuration file. 你可以继续在文本编辑器中创建配置文件,但我们建议使用“Office 自定义工具”。You can continue to create the configuration file in a text editor, but we recommend using the Office Customization Tool instead. 利用 Office 自定义工具,你可以在基于 Web 的界面中轻松创建和修改配置文件。With the Office Customization Tool, you can easily create and modify configuration files in a web-based interface. 有关更多详细信息,请参阅 Office 部署工具概述For more details, see Overview of the Office Customization Tool.

标准配置文件示例Example of a standard configuration file

ODT 包含 2 个文件:setup.exe 和 configuration.xml。若要使用该工具,请编辑配置文件以定义所需选项,然后从命令行运行 setup.exe。例如,可以编辑配置文件以下载 32 位 Office 英文版,或编辑文件以安装 32 位 Office 英文版同时自动接受 EULA,而不安装 发布服务器。The ODT consists of two files: setup.exe and configuration.xml. To work with the tool, you edit the configuration file to define what options you want, and then run setup.exe from the command line. For example, you can edit the configuration file to download the 32-bit English edition of Office, or you can edit the file to install the 32-bit English edition of Office with the EULA automatically accepted and without Publisher.

创建配置文件时,建议从示例文件入手,再在其中更新环境对应的选项。首先,可以将下面的示例复制并粘贴到文本文件中,并使用选定名称进行保存。此文件可用于修改 XML 元素和属性。请参阅本文的剩余部分,详细了解每个元素和属性。When creating the configuration file, we recommend starting with an example file and updating it with the appropriate options for your environment. You can start by copying and pasting the example below into a text file and saving it with a name of your choosing. Use the file to modify the XML elements and attributes and use the rest of this article to learn more details about each of the elements and attributes.

此配置文件包含最常用的元素和属性,可用于下载并将 Office 安装到客户端计算机This configuration file includes the most-commonly used elements and attributes, and can be used to download and install Office on a client computer

<Configuration>
  <Add SourcePath="\\Server\Share" 
       OfficeClientEdition="32"
       Channel="Broad" >
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
      <Language ID="ja-jp" />
    </Product>
    <Product ID="VisioProRetail">
      <Language ID="en-us" />
      <Language ID="ja-jp" />
    </Product>
  </Add>
  <Updates Enabled="TRUE" 
           UpdatePath="\\Server\Share" />
   <Display Level="None" AcceptEULA="TRUE" />  
  <Logging Level="Standard" Path="%temp%" /> 
</Configuration>
Value 说明Description
Add SourcePath="\\Server\Share"Add SourcePath="\\Server\Share"
将 Office 下载到网络上的“\\server\share”,并使用此位置上的安装文件进行部署。Office will be downloaded to "\\server\share" on your network and deployed using installation files at that location.
Add OfficeClientEdition="32"Add OfficeClientEdition="32"
下载并安装 32 位版 OfficeDownloads and installs the 32-bit edition of Office
Add Channel="Broad"Add Channel="Broad"
使用半年频道安装 Office。Office will be installed using the Semi-Annual Channel.
Product ID="O365ProPlusRetail"Product ID="O365ProPlusRetail"
下载并安装 Office 365 ProPlus。Downloads and installs Office 365 ProPlus.
Language ID="en-us"Language ID="en-us"
Language ID="ja-jp"Language ID="ja-jp"
下载并安装英语版和日语版 Office。Downloads and installs English and Japanese versions of Office.
Updates Enabled="TRUE"Updates Enabled="TRUE"
Office 检查更新。Office will check for updates.
Updates UpdatePath="\\Server\Share"Updates UpdatePath="\\Server\Share"
Office 将检查网络上的“\server\share”是否有更新。Office checks for updates at "\server\share" on your network.
Display Level="None" AcceptEULA="TRUE"Display Level="None" AcceptEULA="TRUE"
当安装 Office 时,不显示用户界面。When installing Office, no user interface is displayed.
Logging Level="Standard" Path="%temp%"Logging Level="Standard" Path="%temp%"
日志文件存储在 %temp% 文件夹中。Log files are stored in the %temp% folder.

Add 元素Add element

定义要下载或安装的产品和语言Defines the products and languages to download or install

示例Example

<Add SourcePath="\\Server\Share" 
     OfficeClientEdition="32"
     Channel="Broad" 
     Version="16.0.8201.2193" >
  <Product ID="O365ProPlusRetail">
    <Language ID="en-us" />
    <Language ID="ja-jp" />
  </Product>
  <Product ID="VisioProRetail">
      <Language ID="en-us" />
      <Language ID="ja-jp" />
  </Product>
</Add>  

SourcePath 属性(属于 Add 元素)SourcePath attribute (part of Add element)

可选。定义 Office 安装文件的位置。如果 ODT 在下载模式下运行,定义的是文件保存位置。如果没有添加此属性,ODT 会在部署工具所处的同一文件夹中查找安装文件,再使用 Office 内容传送网络 (CDN)。如果没有添加此属性,且 ODT 在下载模式下运行,Office 安装文件会下载到部署工具所在的同一文件夹中。Optional. Defines the location of the Office installation files. If the ODT is run in download mode, defines where to save the files. If not included, the ODT will look for installation files in the same folder as the tool, and then use the Office Content Delivery Network (CDN). If not included and the ODT is run in download mode, the Office installation files are downloaded to the same folder as the tool.

请注意,在将 Office 下载到已包含相应版本 Office 的文件夹时,ODT 将通过仅下载缺失的文件来节省网络带宽。例如,如果使用 ODT 将 Office 英文版和德语版下载到已包含英文版 Office 的文件夹,则将仅下载德语语言包。Note that when you download Office to a folder that already contains that version of Office, the ODT will conserve your network bandwidth by downloading only the missing files. For example, if you use the ODT to download Office in English and German to a folder that already contains Office in English, only the German language pack will be downloaded.

示例值:Example values:

  • SourcePath="\\server\share"SourcePath="\\server\share"
  • SourcePath="c:\preload\office"SourcePath="c:\preload\office"

Version 属性(属于 Add 元素)Version attribute (part of Add element)

可选。Optional. 默认情况下使用 Office 的最新版本。Optional. The default is the latest available version of Office. 使用 Version 属性时,我们建议也将 Channel 属性包括在内。When you use the Version attribute, we recommend including the Channel attribute as well. 如果不包含 Channel 属性,将使用默认 Channel,该 Channel 可能与指定版本不匹配。If you don't include the Channel attribute, the default channel will be used, which might not match the specified version.

如果设备已安装 Office 365 专业增强版,则可以使用 Version="MatchInstalled" 安装同一版本的 Office,即使有更新的版本可用。If Office 365 ProPlus is already installed on a device, you can use Version="MatchInstalled" to install the same version of Office, even if a newer version is available. 此设置可让你更轻松地添加语言包或 Visio 和 Project ,而无需将 Office 更新到较新版本。This setting can make it easier to add language packs or Visio and Project without updatinging Office to a newer version.

示例值:Example values:

  • Version="16.0.8201.2193"Version="16.0.8201.2193"
  • Version="MatchInstalled"Version="MatchInstalled"

OfficeClientEdition 属性(属于 Add 元素)OfficeClientEdition attribute (part of Add element)

可选。Optional. 定义是下载/安装 32 位还是 64 位版本的 Office 365 专业增强版。Required. Defines whether the 32-bit or 64-bit edition of Office 365 ProPlus is downloaded or installed. 如果设备上未安装 Office,且未指定 OfficeClientEdition,则 ODT 将默认为 64 位版本,除非该设备正在运行 32 位版本的 Windows 或者其 RAM 小于 4 GB。If Office is not installed on the device and OfficeClientEdition is not specified, the ODT will default to the 64-bit edition, unless the device is running a 32-bit edition of Windows or has less than 4 GB RAM. 如果已安装 Office,但未指定 OfficeClientEdition,则 ODT 将与 Office 现有安装项的体系结构相匹配。If Office is installed and OfficeClientEdition not specified, the ODT will match the architecture of the existing installation of Office. 如果已安装 Office 且已指定 OfficeClientEdition,则它必须与已安装的体系结构相匹配。If Office is installed and OfficeClientEdition is specified, then it must match the already installed architecture. 如果没有,则安装将失败,原因是不支持混合体系结构。If it doesn't, the installation will fail, since mixed architectures are not supported.

允许值:Allowed values:

  • OfficeClientEdition="64"OfficeClientEdition="64"
  • OfficeClientEdition="32"OfficeClientEdition="32"

Channel 属性(属于 Add 元素)Channel attribute (part of Add element)

Optional.Optional. Defines which channel to use for installing Office.Defines which channel to use for installing Office. 如果设备上未安装 Office,则对于 Office 365 专业增强版而言,Channel 属性的默认设置为 BroadIf Office is not installed on the device, the default setting for the Channel attribute is Broad for Office 365 ProPlus. 如果设备上安装了 Office,但未指定 Channel 属性,则 ODT 将与现有安装项的频道相匹配。If Office is installed on the device and the channel attribute is not specified, the ODT will match the channel of the existing installation.

如果随附 Office 365 专业增强版安装了 Visio Online Plan 2(之前称为 Visio Pro for Office 365)和 Project Online 桌面客户端,则默认设置为“广泛”。The default is Broad for Office 365 ProPlus and applies to Visio Online Plan 2 (previously named Visio Pro for Office 365) and Project Online Desktop client if deployed along with Office 365 ProPlus. 如果部署了 Visio Online Plan 2 和 Project Online 桌面客户端,但没有 Office 365 专业增强版,则默认设置为“每月”。If Visio Online Plan 2 and Project Online Desktop Client are deployed without Office 365 ProPlus, the default setting is Monthly.

若要详细了解更新通道,请参阅 Office 365 专业增强版的更新通道概述For more information about update channels, see Overview of update channels for Office 365 ProPlus.

允许值:Allowed values:

  • Channel="Monthly"Channel="Monthly"
  • Channel="Broad"Channel="Broad"
  • Channel="Targeted"Channel="Targeted"

半年频道使用 "Broad",半年频道(定向)使用 "Targeted"。Use "Broad" for Semi-Annual Channel and "Targeted" for Semi-Annual Channel (Targeted).

如果你正在部署 Office 2019 专业增强版(适用于 Office 的批量许可版本),则需要使用其他更新通道:PerpetualVL2019。有关详细信息,请参阅 Office 2019 更新通道If you're deploying Office Professional Plus 2019, which is a volume licensed version of Office, there is a different update channel you need to use: PerpetualVL2019. For more information, see Update channel for Office 2019.

DownloadPath 属性(属于 Add 元素)DownloadPath attribute (part of Add element)

可选。Optional. 定义安装文件下载的位置。Defines where the installation files are downloaded from. 最常用于将 Office 的特定语言和产品从网络上的一个中心位置分发到另一个位置。Most commonly used to distribute specific languages and products for Office from a central location on your network to another location. 若要使用此设置,请在下载模式下运行 ODT。To use this setting, run the ODT in download mode. 如果不包括,则从 Office CDN 下载文件。If not included, the files are downloaded from the Office CDN. 请注意,使用 DownloadPath 时,必须指定版本,如示例中所示。Note that you must specify a version when using DownloadPath, as shown in the example.

示例值:Example values:

  • DownloadPath="\\servera\share"DownloadPath="\\servera\share"

示例Example

<Configuration> 
  <Add SourcePath="\\serverb\share" OfficeClientEdition="64" Version="16.0.6741.2056" DownloadPath="\\servera\share"> 
    <Product ID="O365ProPlusRetail" > 
      <Language ID="en-us" />      
    </Product> 
  </Add> 
</Configuration>

AllowCdnFallback 属性(属于 Add 元素)AllowCdnFallback attribute (part of Add element)

可选。若要将 Office CDN 作为语言包的备份源,请在配置文件中包含“AllowCdnFallback”属性,如示例中所示。Optional. To use the Office CDN as a backup source for language packs, include the "AllowCdnFallback" attribute in the configuration file, as shown in the example.

安装语言时,ODT 会首先在 SourcePath 属性中所指定的位置查找源文件。如果在该位置无法找到相应的语言包 AllowCdnFallback 设置为 True,那么 ODT 将会使用来自 Office CDN 的源文件。When installing languages, the ODT looks first for source files in the location specified in the SourcePath attribute. If the language pack isn't available at that location and the AllowCdnFallback setting is set to True, then the ODT will use source files from the Office CDN.

允许值:Allowed values:

  • AllowCdnFallback="True"AllowCdnFallback="True"
  • AllowCdnFallback="False"AllowCdnFallback="False"

示例Example

<Add SourcePath="\\Server\Share" 
     OfficeClientEdition="32"
     Channel="Broad" 
     AllowCdnFallback="True">
  <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
      <Language ID="ja-jp" />
  </Product>
</Add>  

MigrateArch 属性(属于 Add 元素)MigrateArch attribute (part of Add element)

可选。Optional. 如果设置为 TRUE,则现有 Office 365 专业增强版安装将更改为 OfficeClientEdition 属性中指定的架构(有时被称为位数)。If set to TRUE, then your existing installation of Office 365 ProPlus will be changed to the architecture (sometimes referred to as the bitness) that is specified in the OfficeClientEdition attribute. 例如,可以使用它将 32 位 Office 365 专业增强版安装更改为 64 位安装。For example, you can use this to change a 32-bit installation of Office 365 ProPlus to a 64-bit installation.

要详细了解如何使用 MigrateArch,请参阅将 Office 365 专业增强版安装项从 32 位更改为 64 位For more information about using MigrateArch, see Change an Office 365 ProPlus installation from 32-bit to 64-bit.

OfficeMgmtCOM 属性(属于 Add 元素)OfficeMgmtCOM attribute (part of Add element)

可选。Optional. 必须在安装了 Office 的计算机上启用 Office COM 对象,这样 Configuration Manager 才能管理 Office 365 客户端更新。For Configuration Manager to be able to manage Office 365 client updates, an Office COM object needs to be enabled on the computer where Office is installed. 如果设为 TRUE,则 Office COM 对象使用 Configuration Manager 中的命令来下载和安装客户端更新。If set to TRUE, the Office COM object takes commands from Configuration Manager to download and install client updates. 启用 Office COM 对象后,自动在 Office 365 专业增强版的帐户页面上为客户端设备启用“立即更新”选项。When the Office COM object is enabled, the Update Now option on the Account page for Office 365 ProPlus is automatically disabled for client devices.

有关详细信息,请参阅管理使用 System Center Configuration Manager 对 Office 365 专业增强版进行的更新For more information, see Manage updates to Office 365 ProPlus with System Center Configuration Manager.

允许值:Allowed values:

  • OfficeMgmtCOM="True"OfficeMgmtCOM="True"
  • OfficeMgmtCOM="False"OfficeMgmtCOM="False"

示例Example

<Configuration>
  <Add OfficeClientEdition="64" Channel="Monthly" OfficeMgmtCOM="True" >
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
    </Product>
  </Add>  
  <Updates Enabled="True"  /> 
</Configuration>

Product 元素Product element

定义要下载或安装的产品。如果定义了多个产品,这些产品会按照配置文件中的顺序进行安装。首个产品决定了 Microsoft Office 首次运行体验上下文。Defines which products to download or install. If you define multiple products, the products are installed in the order in the configuration file. The first product determines the context for the Microsoft Office First Run Experience.

此外,还可以使用 Product 元素将语言包添加到现有 Office 365 专业增强版安装中。You can also use the Product element to add language packs to existing installations of Office 365 ProPlus. 有关如何操作的更多详细信息,包括示例配置文件,请参阅向现有 Office 365 专业增强版安装部署语言For more details on how, including an example configuration file, see Deploy languages to existing installations of Office 365 ProPlus.

示例Example

<Product ID="O365ProPlusRetail">
  <Language ID="en-us" />
  <Language ID="ja-jp" />
</Product>
<Product ID="VisioProRetail">
  <Language ID="en-us" />
  <Language ID="ja-jp" />
</Product>

ID 属性(属于 Product 元素)ID attribute (part of Product element)

必需。定义要下载或安装的产品的 ID。Required. Defines the ID of the product to download or install.

示例值:Example values:

  • ID="O365ProPlusRetail"ID="O365ProPlusRetail"
  • ID="VisioProRetail"ID="VisioProRetail"
  • ID="ProjectProRetail"ID="ProjectProRetail"

有关所有受支持的产品 ID 的列表,请参阅 Office 部署工具支持的即点即用产品 IDFor a list of all supported product IDs, see Product IDs that are supported by the Office Deployment Tool for Click-to-Run

Language 元素Language element

定义要下载或安装的语言。如果定义多个语言,那么配置文件中的首个语言决定了 Shell UI 区域性,包括快捷方式、右键单击关联菜单和工具提示。如果决定要在初始安装后更改 Shell UI 语言,必须卸载并重新安装 Office。Defines which languages to download or install. If you define multiple languages, the first language in the configuration file determines the Shell UI culture, including shortcuts, right-click context menus, and tooltips. If you decide that you want to change the Shell UI language after an initial installation, you have to uninstall and reinstall Office.

请注意,如果 Office 不支持操作系统语言,或 ODT 无法在本地源文件中找到正确的语言包,MatchOS 和 MatchInstalled 将无法安装该语言。Note that MatchOS and MatchInstalled cannot install the operating system languages if Office doesn't support that language or if the ODT cannot find the correct language pack in the local source files. 若要解决此问题,建议指定备用语言以及语言包备用源位置。To help address this issue, we recommend that you specify a backup language and and a backup source location for the language pack. 可使用 Fallback 和 AllowCdnFallBack 属性完成此操作。To do so, use the Fallback attribute and AllowCdnFallBack attribute. 有关详细信息,请参阅部署语言概述For more details, see Overview of deploying languages.

示例Example

<Product ID="O365ProPlusRetail">
  <Language ID="en-us" />
  <Language ID="ja-jp" />
</Product>
<Add SourcePath="\\Server\Share" 
     OfficeClientEdition="32"
     Channel="Broad" 
     AllowCdnFallback="True">
  <Product ID="O365ProPlusRetail">
     <Language ID="MatchInstalled" />
     <Language ID="MatchOS" Fallback="en-us" />
  </Product>
</Add>  

ID 属性(属于 Language 元素)ID attribute (part of Language element)

定义要下载或安装的语言的 ID。必填。Defines the ID of the language to download or install. Required.

示例值Example values

  • ID="en-us"ID="en-us"
  • ID="ja-jp"ID="ja-jp"
  • ID="MatchOS"ID="MatchOS"
  • ID="MatchPreviousMSI"ID="MatchPreviousMSI"

有关所有语言的列表,请参阅语言、区域性代码和伴随校对语言For a list of all languages, see Languages, culture codes, and companion proofing languages.

有关 MatchPreviousMSI 的详细信息,请参阅升级到 Office 365 专业增强版时删除现有 MSI 版本的 OfficeFor more information about MatchPreviousMSI, see Remove existing MSI versions of Office when upgrading to Office 365 ProPlus.

Fallback 属性(属于 Language 元素)Fallback attribute (part of Language element)

使用 MatchOS 时,当 Office 不支持匹配语言或在本地源文件中找不到匹配语言时,建议指定要安装的回退语言。为此,请使用“Fallback”属性。有关详细信息,请参阅安装与操作系统相同的语言When using MatchOS, we recommend that you specify a fallback language to install when a matched language isn't supported by Office or can't be found in the local source files. To do so, use the "Fallback" attribute. For more details, see Install the same languages as the operating system.

示例值:Example values:

  • Fallback="en-us"Fallback="en-us"
  • Fallback="ja-jp"Fallback="ja-jp"

Display 元素Display element

定义安装 Office 时用户看到的内容。Defines what the user sees when Office is installed.

示例Example

<Display Level="None" AcceptEULA="TRUE" />  

Level 属性(属于 Display 元素)Level attribute (part of Display element)

可选。如果 Level 设置为 None,安装 Office 时不显示用户界面。也就是说,不显示进度栏、完成屏幕、错误消息或其他任何用户界面。Optional. If Level is set to None, Office is installed with no user interface: no progress bars, completion screens, error messages, or other user interface are displayed.

如果 Level 设置为 Full,安装 Office 时将提供正常安装体验。If Level is set to Full, Office is installed with the normal installation experience.

默认值为 FullDefault is Full.

允许值:Allowed values:

  • Level="None"Level="None"
  • Level="Full"Level="Full"

AcceptEULA 属性(属于 Display 元素)AcceptEULA attribute (part of Display element)

可选。如果 AcceptEULA 设置为 TRUE,那么用户看不到“Microsoft 软件许可条款”对话框。如果此属性设置为 FALSE 或没有添加此属性,那么用户可能会看到“Microsoft 软件许可条款”对话框。建议管理员将 AcceptEULA 设置为 TRUEOptional. If AcceptEULA is set to TRUE, the user does not see a Microsoft Software License Terms dialog box. If this attribute is set to FALSE or is not included, the user may see a Microsoft Software License Terms dialog box. We recommend that administrators set AcceptEULA to TRUE.

默认值为 FALSEDefault is FALSE.

允许值:Allowed values:

  • AcceptEULA="TRUE"AcceptEULA="TRUE"
  • AcceptEULA="FALSE"AcceptEULA="FALSE"

备注

如果部署的 Office 版本早于版本 1803,仅当使用用户帐户安装时才会应用此设置。System Center Configuration Manager 和其他使用系统帐户进行安装的软件分发工具不会应用该设置。If you deploy a version of Office before Version 1803, this setting will be applied only if you install with the user's account. System Center Configuration Manager and other software distribution tools that use the SYSTEM account for installation will not apply the setting.

ExcludeApp 元素ExcludeApp element

定义不应安装哪些 Office 365 专业增强版产品。请注意,安装 Office 365 专业增强版、Word、Excel、PowerPoint、Publisher、Visio 和 Skype 时会自动安装 OneDrive。如果不希望 OneDrive 随这些应用程序安装,则使用 ExcludeApp 元素将其删除。有关详细信息,请参阅安装 Office 365 专业增强版或其他应用程序时排除 OneDriveDefines which Office 365 ProPlus products should not be installed. Note that OneDrive is automatically installed when you install Office 365 ProPlus, Word, Excel, PowerPoint, Publisher, Visio, and Skype. If you don't want OneDrive installed with those applications, use the ExcludeApp element to remove it. For more details, see Exclude OneDrive when installing Office 365 ProPlus or other applications.

示例Example

<Add SourcePath="\\Server\Share" 
     OfficeClientEdition="32"
     Channel="Broad" >
  <Product ID="O365ProPlusRetail">
    <Language ID="en-us" />
    <Language ID="ja-jp" />
    <ExcludeApp ID="Publisher" />
  </Product>
</Add>  

如果在已安装 Office 365 专业增强版的设备上使用带 ExcludeApp 的配置文件安装 Office,则 ExcludeApp 设备的处理方式将存在不同,具体取决于下述语言列表:If a configuration file with ExcludeApp is used to install Office on a device that already has Office 365 ProPlus installed, the ExcludeApp setting is treated differently based on the list of languages:

  • 如果配置文件中的语言列表包含所安装的全部语言,则该文件中的 ExcludeApp 设置将替代设备上的所有现有 ExcludeApp 设置。If the list of languages in the configuration file includes all the installed langauges, then the ExcludeApp setting in the file replaces any existing ExcludeApp setting on the device. 如果配置文件中的语言列表既包括所安装的全部语言,又包括其他语言,也会出现此情况。This is also true if the list of languages in the configuration file includes both all the installed languages and additional languages.
  • 如果配置文件中的语言列表不包含部分安装的语言,则配置文件的 ExcludeApp 设置将与设备上的 ExcludeApp 设置结合使用。If the list of languages in the configuration file doesn't include all the installed languages, then the ExcludeApp setting in the configuration file will be combined with the ExcludeApp setting on the device.

ID 属性(属于 ExcludeApp 元素)ID attribute (part of ExcludeApp element)

必需。定义不应安装的产品的 ID。Required. Defines the ID of the product that should not be installed.

允许值:Allowed values:

  • ID="Access"ID="Access"
  • ID="Excel"ID="Excel"
  • ID="Groove"ID="Groove"
  • ID="Lync"ID="Lync"
  • ID="OneDrive"ID="OneDrive"
  • ID="OneNote"ID="OneNote"
  • ID="Outlook"ID="Outlook"
  • ID="PowerPoint"ID="PowerPoint"
  • ID="Publisher"ID="Publisher"
  • ID="Teams"ID="Teams"
  • ID="Word"ID="Word"

对于 OneDrive for Business,请使用 Groove。对于 Skype for Business,请使用 LyncFor OneDrive for Business, use Groove. For Skype for Business, use Lync.

要详细了解 Microsoft Teams,请参阅使用 Office 365 专业增强版部署 Microsoft Teams.For more information about Microsoft Teams, see Deploy Microsoft Teams with Office 365 ProPlus.

Logging 元素Logging element

定义 ODT 日志记录选项。Defines options for ODT logging.

示例Example

<Logging Level="Standard" 
         Path="%temp%" />

Level 属性(属于 Logging 元素)Level attribute (part of Logging element)

可选。启用或禁用日志记录。默认值为 StandardOptional. Turns logging on or off. Default is Standard.

允许值:Allowed values:

  • Level="Off"Level="Off"
  • Level="Standard"Level="Standard"

Path 属性(属于 Logging 元素)Path attribute (part of Logging element)

可选。定义日志文件的位置。默认值为 %temp%Optional. Defines the location of the log files. Default is %temp%.

示例值:Example values:

  • Path="%temp%"Path="%temp%"
  • Path="\\server\share\userlogs"Path="\\server\share\userlogs"

Property 元素Property element

定义特定 Office 行为和属性。Defines certain Office behaviors and properties.

示例Example

<Property Name="FORCEAPPSHUTDOWN" Value="FALSE"/>
<Property Name="SharedComputerLicensing" Value="1"/>
<Property Name="SCLCacheOverride" Value="1" />
<Property Name="SCLCacheOverrideDirectory" Value="\\server\share\%username%" />
<Property Name="PinIconsToTaskbar" Value="TRUE"/>

Name 属性(属于 Property 元素)Name attribute (part of Property element)

必需。定义要设置其值的特定属性。Required. Defines the specific property whose value you want to set.

Value 属性(属于 Property 元素)Value attribute (part of Property element)

定义命名属性的值。Defines the value of the named property.

AUTOACTIVATE 属性(属于 Property 元素)AUTOACTIVATE property (part of Property element)

因为 Office 365 专业增强版设置为自动激活,所以不得为 Office 365 专业增强版产品设置此属性。对于其他产品,可以将 AUTOACTIVATE 设置为 1,让产品能够自动激活。Because Office 365 ProPlus is set to activate automatically, you should not set this property for Office 365 ProPlus products. For other products, you can set AUTOACTIVATE to 1 to have the product activate automatically.

可选。默认值为 0Optional. Default is 0.

允许值:Allowed values:

  • Property Name="AUTOACTIVATE" Value="0"Property Name="AUTOACTIVATE" Value="0"
  • Property Name="AUTOACTIVATE" Value="1"Property Name="AUTOACTIVATE" Value="1"

FORCEAPPSHUTDOWN 属性(属于 Property 元素)FORCEAPPSHUTDOWN property (part of Property element)

如果设置为 TRUE,强制关闭任何阻碍 Office 安装的应用。可能发生数据丢失。When set to TRUE, forces any apps that are blocking the install of Office to shut down. Data loss may occur.

可选。默认值为 FALSEOptional. Default is FALSE.

允许值:Allowed values:

  • Property Name="FORCEAPPSHUTDOWN" Value="FALSE"Property Name="FORCEAPPSHUTDOWN" Value="FALSE"
  • Property Name="FORCEAPPSHUTDOWN" Value="TRUE"Property Name="FORCEAPPSHUTDOWN" Value="TRUE"

PACKAGEGUID 属性(属于 Property 元素)PACKAGEGUID property (part of Property element)

默认情况下,ODT 创建的 App-V 包共用同一个 App-V 包 ID。管理员可以使用 PACKAGEGUID 指定其他包 ID。这样一来,便可以向 App-V 管理服务器发布多个 Office App-V 包。不过,这样并无法向一个计算机部署多个 Office App-V 包。可以使用 ODT 创建 Office 365 专业增强版的 App-V 包。不支持创建批量许可版本 Office Professional Plus 或 Office Standard 的包。By default, App-V packages created by the ODT share the same App-V Package ID. Administrators can use PACKAGEGUID to specify a different Package ID. This allows you to publish multiple App-V packages of Office to an App-V Management Server. But, this doesn't enable you to deploy more than one Office App-V package to a single computer. You can use the ODT to create App-V packages for Office 365 ProPlus. Creating packages for the volume-licensed versions of Office Professional Plus or Office Standard is not supported.

包 ID 必须遵循示例中的格式,并且只能使用下面这些字符:0、1、2、3、4、5、6、7、8、9、A、B、C、D、E、FThe Package ID must follow the format of the example and can only use these characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

如果使用其他任何字符,创建的 APP-V 包使用默认包 ID。If you use any other characters, the App-V package is created with the default Package ID.

可选。Optional.

示例值:Example values:

  • Property Name="PACKAGEGUID" Value="12345678-ABCD-1234-ABCD-1234567890AB"Property Name="PACKAGEGUID" Value="12345678-ABCD-1234-ABCD-1234567890AB"

SharedComputerLicensing 属性(属于 Property 元素)SharedComputerLicensing property (part of Property element)

如果使用远程桌面服务将 Office 365 专业增强版部署到共享计算机,请将 SharedComputerLicensing 设置为 1。Set SharedComputerLicensing to 1 if you deploy Office 365 ProPlus to shared computers by using Remote Desktop Services.

有关详细信息,请参阅 Office 365 专业增强版的共享计算机激活概述For more information, see Overview of shared computer activation for Office 365 ProPlus.

可选。默认值为 0Optional. Default value is 0.

允许值:Allowed values:

  • Property Name="SharedComputerLicensing" Value="0"Property Name="SharedComputerLicensing" Value="0"
  • Property Name="SharedComputerLicensing" Value="1"Property Name="SharedComputerLicensing" Value="1"

SCLCacheOverride 属性(属于 Property 元素)SCLCacheOverride property (part of Property element)

如果使用的是共享计算机激活,并且想要漫游许可令牌,请将 SCLCacheOverride 设置为 1。与 SCLCacheOverrideDirectory 配合使用。Set SCLCacheOverride to 1 if you're using shared computer activation and you want to roam the licensing token. Use in conjunction with SCLCacheOverrideDirectory.

有关详细信息,请参阅 Office 365 专业增强版的共享计算机激活概述For more information, see Overview of shared computer activation for Office 365 ProPlus.

可选。默认值为 0Optional. Default value is 0.

允许值:Allowed values:

  • Property Name="SCLCacheOverride" Value="0"Property Name="SCLCacheOverride" Value="0"
  • Property Name="SCLCacheOverride" Value="1"Property Name="SCLCacheOverride" Value="1"

SCLCacheOverrideDirectory 属性(属于 Property 元素)SCLCacheOverrideDirectory property (part of Property element)

如果使用的是共享计算机激活,并且想要漫游许可令牌,设置 SCLCacheOverrideDirectory 指定许可标记的文件夹位置。与 SCLCacheOverride 配合使用。Set SCLCacheOverrideDirectory to specify a folder location for the licensing token if you're using shared computer activation and you want to roam the licensing token. Use in conjunction with SCLCacheOverride.

有关详细信息,请参阅 Office 365 专业增强版的共享计算机激活概述For more information, see Overview of shared computer activation for Office 365 ProPlus.

可选。Optional.

示例值:Example values:

  • Property Name="SCLCacheOverrideDirectory" Value="%appdata%\Microsoft"Property Name="SCLCacheOverrideDirectory" Value="%appdata%\Microsoft"
  • Property Name="SCLCacheOverrideDirectory" Value="\\server\share\%username%"Property Name="SCLCacheOverrideDirectory" Value="\\server\share\%username%"

PinIconsToTaskBar 属性(属于 Property 元素)PinIconsToTaskBar property (part of Property element)

定义是否向 Windows 7、8 和 8.1 中的 Windows 任务栏添加 Office 产品的快捷方式图标。如果使用系统帐户安装 Office(使用 System Center Configuration Manager 进行部署时的常见做法),即使此属性设置为 True,也不会固定图标。Defines whether shortcut icons for Office products are added to the Windows taskbar in Windows 7, 8, and 8.1. If you install Office using a system account, which is common when deploying with System Center Configuration Managers, the icons will not be pinned even if this property is set to True.

可选。默认值为 TrueOptional. The default value is True.

允许值:Allowed values:

  • Property Name="PinIconsToTaskbar" Value="FALSE"Property Name="PinIconsToTaskbar" Value="FALSE"
  • Property Name="PinIconsToTaskbar" Value="TRUE"Property Name="PinIconsToTaskbar" Value="TRUE"

Remove 元素Remove element

定义要从旧 Office 365 专业增强版安装中删除哪些产品和语言。Defines which products and languages to remove from a previous installation of Office 365 ProPlus. To remove an installed language, you must provide both the product and the language, as in the example. 若要删除已安装的语言,必须同时提供产品和语言,如示例所示。Defines which products and languages to remove from a previous installation of Office 365 ProPlus. To remove an installed language, you must provide both the product and the language, as in the example. 若要删除所有已安装的语言,请勿添加 language 属性。To remove all the installed languages, do not include the language attribute. 在这种情况下,ODT 会自动发现并删除产品的所有已安装语言。In that case, the ODT automatically discovers and removes all installed languages for the product.

有关详细信息,请参阅 Office 部署工具概述For more information, see Overview of the Office Deployment Tool.

示例Example

<Remove All="FALSE">
  <Product ID="O365ProPlusRetail" >
    <Language ID="es-es" />
  </Product>
</Remove>

All 属性(属于 Remove 元素)All attribute (part of Remove element)

如果设置为 TRUE,将删除所有 Office 365 专业增强版产品和语言。If set to TRUE, all Office 365 ProPlus products and languages will be removed.

可选。默认值为 FALSEOptional. The default value is FALSE.

允许值:Allowed values:

  • All="FALSE"All="FALSE"
  • All="TRUE"All="TRUE"

Updates 元素Updates element

定义如何在安装后更新 Office。Defines how Office is updated after it's installed.

示例Example

<Updates Enabled="TRUE" 
         UpdatePath="\\Server\Share\"
         Channel="Broad" />

Enabled 属性(属于 Updates 元素)Enabled attribute (part of Updates element)

如果设置为 TRUE,Office 将检查更新。如果设置为 FALSE,Office 不会检查更新,但用户可以通过转到“文件”**** > “帐户”**** > “更新选项”**** > “立即更新”**** 来检查更新。If set to TRUE, Office will check for updates. If set to FALSE, Office won't check for updates, but the user can check for updates by going to File > Account > Update Options > Update Now.

可选。默认值为 TRUEOptional. The default value is TRUE.

允许值:Allowed values:

  • Enabled="TRUE"Enabled="TRUE"
  • Enabled="FALSE"Enabled="FALSE"

UpdatePath 属性(属于 Updates 元素)UpdatePath attribute (part of Updates element)

定义 Office 更新来源。如果未设置 UpdatePath 或设置为空 (""),那么位置设置为 Office 内容传送网络 (CDN)。UpdatePath 可以指定 Office 安装文件源的网络路径、本地路径或 HTTP 路径。环境变量可用于网络路径或本地路径。Defines where the updates for Office come from. If UpdatePath is not set or is set to empty (""), the location is set to the Office Content Delivery Network (CDN). UpdatePath can specify a network, local, or HTTP path of a source for Office installation files. Environment variables can be used for network or local paths.

如果将组策略与 Office 管理模板文件 (ADMX/ADML) 结合使用,可以使用“更新路径”**** 策略设置来设置 UpdatePath。此策略设置位于 Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates 下。If you use Group Policy with the Administrative Template files (ADMX/ADML) for Office, you can set UpdatePath by using the Update Path policy setting. You can find this policy setting under Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates.

可选。Optional.

示例值:Example values:

TargetVersion 属性(属于 Updates 元素)TargetVersion attribute (part of Updates element)

定义要将 Office 更新到的版本。如果未设置 TargetVersion 或设置为空 (""),那么 Office 将更新到指定更新路径中的最新版本。如果 TargetVersion 设置为内部版本号,Office 将尝试更新到此版本。Defines which version Office updates to. If TargetVersion is not set or is set to empty (""), Office updates to the most recent version from the specified update path. If TargetVersion is set to a specific build number, Office attempts to update to that version.

如果将组策略与 Office 管理模板文件 (ADMX/ADML) 结合使用,可以使用“目标版本”**** 策略设置来设置 TargetVersion。此策略设置位于 Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates 下。If you use Group Policy with the Administrative Template files (ADMX/ADML) for Office, you can set TargetVersion by using the Target Version policy setting. You can find this policy setting under Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates.

可选。Optional.

示例值:Example values:

  • TargetVersion="15.1.2.3"TargetVersion="15.1.2.3"
  • TargetVersion=""TargetVersion=""

Deadline 属性(属于 Updates 元素)Deadline attribute (part of Updates element)

定义必须应用更新的截止时间。截止时间使用协调世界时 (UTC) 进行指定。可以结合使用 DeadlineTargetVersion,以确保在某日期前将 Office 更新到特定版本。建议至少将截止时间设置为未来一周后,以便为用户留出时间来安装更新。Defines a deadline by which updates must be applied. The deadline is specified in Coordinated Universal Time (UTC). You can use Deadline with Target Version to make sure that Office is updated to a particular version by a particular date. We recommend that you set the deadline at least a week in the future to allow users time to install the updates.

用户会在截止时间前收到多个更新安装提醒。如果 Office 未在截止时间前进行更新,用户便会看到通知,提示 Office 将在 15 分钟后进行更新。这样一来,用户就有机会保存当前正在处理的 Office 文档,并关闭所有已打开的 Office 程序。如果用户未关闭 Office 程序,这些程序会在 15 分钟倒计时结束后自动关闭,这可能会导致数据丢失。Prior to the deadline, users receive multiple reminders to install the updates. If Office isn't updated by the deadline, users see a notification that the updates will be applied in 15 minutes. This gives users the opportunity to save the Office documents that they are working on and to close any Office programs that are open. If users don't close the Office programs,the programs are closed automatically when the 15 minutes are up, which might result in data loss.

在 Office 程序关闭后,更新会自动应用。截止时间仅适用于一组更新。若要使用截止时间确保 Office 始终为最新版本,必须在每次有 Office 更新时更改截止时间。After the Office programs are closed, the updates are applied automatically. The deadline only applies to one set of updates. If you want to use a deadline to make sure that Office is always up-to-date, you must change the deadline every time a new update for Office is available.

若要使用此属性,Office 必须运行 Service Pack 1(版本 15.0.4569.1507)及更高版本。如果将组策略与 Office 管理模板文件 (ADMX/ADML) 结合使用,可以使用“更新截止时间”**** 策略设置来设置 Deadline。此策略设置位于 Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates 下。To use this attribute, Office must be running at least Service Pack 1 (version 15.0.4569.1507). If you use Group Policy with the Administrative Template files (ADMX/ADML) for Office, you can set Deadline by using the Update Deadline policy setting. You can find this policy setting under Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates.

可选。Optional.

示例值:Example value:

  • Deadline="05/16/2014 18:30"Deadline="05/16/2014 18:30"

Channel 属性(属于 Updates 元素)Channel attribute (part of Updates element)

定义要在安装后用于更新 Office 的频道。请注意,有两个频道属性:Add 元素的频道用于在安装 Office 时指定更新频道,Update 元素的频道用于更改现有 Office 安装的频道。Defines which channel to use for updating Office after it is installed. Note that there are two channel attributes: the channel for the Add element is used to specify an update channel while installing Office, and the channel for the Update element is used to change the channel for an existing installation of Office.

若要详细了解更新通道,请参阅 Office 365 专业增强版的更新通道概述For more information about update channels, see Overview of update channels for Office 365 ProPlus.

如果将组策略与 Office 管理模板文件 (ADMX/ADML) 结合使用,可以使用“更新通道”**** 策略设置来设置 Channel。此策略设置位于 Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates 下。如果已启用,此组策略设置的优先级高于使用 Office 部署工具设置的 Channel 值。If you use Group Policy with the Administrative Template files (ADMX/ADML) for Office, you can set Channel by using the Update Channel policy setting. You can find this policy setting under Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates. If enabled, this Group Policy setting takes precedence over the Channel value set by using the Office Deployment Tool.

可选。默认对 Office 365 专业增强版使用 Broad,对 Visio Online Plan 2(以前名为 Visio Pro for Office 365)和 Project Online 桌面客户端使用 MonthlyOptional. The default is Broad for Office 365 ProPlus and Monthly for Visio Online Plan 2 (previously named Visio Pro for Office 365) and Project Online Desktop Client.

允许值:Allowed values:

  • Channel="Monthly"Channel="Monthly"
  • Channel="Broad"Channel="Broad"
  • Channel="Targeted"Channel="Targeted"

半年频道使用 "Broad",半年频道(定向)使用 "Targeted"。Use "Broad" for Semi-Annual Channel and "Targeted" for Semi-Annual Channel (Targeted).

如果你正在部署 Office 2019 专业增强版(适用于 Office 的批量许可版本),则需要使用其他更新通道:PerpetualVL2019。有关详细信息,请参阅 Office 2019 更新通道If you're deploying Office Professional Plus 2019, which is a volume licensed version of Office, there is a different update channel you need to use: PerpetualVL2019. For more information, see Update channel for Office 2019.

RemoveMSI 元素RemoveMSI element

可选。Optional.

安装指定产品(如 Office 365 专业增强版)之前,指定是否从计算机卸载使用 Windows Installer (MSI) 安装的任何 2010、2013 或 2016 版本的 Office、Visio 和 Project。Specifies whether any 2010, 2013, or 2016 versions of Office, Visio, and Project that were installed using Windows Installer (MSI) are uninstalled from the computer prior to the installation of the specified product, such as Office 365 ProPlus.

有关使用 RemoveMSI 的详细信息,请参阅升级到 Office 365 专业增强版时删除现有 MSI 版本的 OfficeFor more information about using RemoveMSI, see Remove existing MSI versions of Office when upgrading to Office 365 ProPlus.

IgnoreProduct 属性(属于 RemoveMSI 元素)IgnoreProduct attribute (part of RemoveMSI element)

如果指定一个 ID,不会从计算机中卸载此 Windows Installer (MSI) 产品。If an ID is specified, that Windows Installer (MSI) product won't be uninstalled from the computer.

可选。Optional.

示例值:Example values:

  • IgnoreProduct ID="VisPro"IgnoreProduct ID="VisPro"
  • IgnoreProduct ID="PrjPro"IgnoreProduct ID="PrjPro"

AppSettings 元素AppSettings element

定义 Office 365 专业增强版的应用程序设置,包括 VBA 宏通知、默认文件位置和默认文件格式。若要使用应用程序设置创建配置文件,建议使用即点即用 Office 自定义工具,这是一个具有完整用户界面的 Web 应用程序。该工具还可用于深入了解可用应用程序设置。Defines application settings for Office 365 ProPlus, including VBA Macro notifications, default file locations, and default file format. To create a configuration file with application settings, we recommend you use the Office Customization Tool for Click-to-Run, a web application with a full user interface. You can also use the tool to learn more about the available application settings.

有关应用程序设置的详细信息,请参阅应用应用程序设置将应用程序设置应用于现已安装的 OfficeFor more details on application settings, see Apply application settings and Apply application settings to an existing installation of Office.

可选。Optional.

示例Example

  <AppSettings>
    <User Key="software\microsoft\office\16.0\excel\security"
          Name="vbawarnings" 
          Value="3" 
          Type="REG_DWORD" 
          App="excel16" 
          Id="L_VBAWarningsPolicy" />
  </AppSettings>