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

借助 Office 部署工具 (ODT),你可以下载并将 Microsoft 365 应用部署到客户端计算机。With the Office Deployment Tool (ODT), you can download and deploy Microsoft 365 Apps to your client computers. 使用 ODT,可更好地控制 Office 安装:可以定义要安装哪些产品和语言、应该如何更新这些产品以及是否向用户显示安装体验。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. 若要了解如何使用工具本身,请参阅 Office 部署工具概述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 information, 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="SemiAnnual" >
    <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="SemiAnnual"Add Channel="SemiAnnual"
将使用半年企业频道安装 Office。Office will be installed using Semi-Annual Enterprise Channel.
Product ID="O365ProPlusRetail"Product ID="O365ProPlusRetail"
下载并安装 Microsoft 365 企业应用版。Downloads and installs Microsoft 365 Apps for enterprise.
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="SemiAnnual" 
     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)

可选。Optional.

定义 Office 安装文件的位置。Defines the location of the Office installation files. 如果 ODT 在下载模式下运行,定义要保存文件的位置。If the ODT is run in download mode, defines where to save the files. 如果不包括,ODT 将在工具所在的文件夹中查找安装文件,然后使用 Office 内容交付网络 (CDN)。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). 如果不包括且 ODT 在下载模式下运行,Office 安装文件将下载到该工具所在的同一文件夹中。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 的文件夹,将仅下载德语语言包。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. 如果未指定,则默认为可用的最新版本。Defaults to the latest version available if not specified.

使用 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.

如果设备已安装 Microsoft 365 应用,则可以使用 Version="MatchInstalled" 安装同一版本的 Office,即使有更新的版本可用。If Microsoft 365 Apps 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 updating 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 位版本的 Microsoft 365 应用。Defines whether the 32-bit or 64-bit edition of Microsoft 365 Apps 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,则 Channel 属性的默认设置为 CurrentIf Office is not installed on the device, the default setting for the Channel attribute is Current. 如果设备上安装了 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.

此值将决定要安装的频道,不考虑是否在 Updates 元素中或通过组策略设置指定了更新频道。This value determines the channel to be installed, regardless of an optionally specified update channel in the Updates element or via Group Policy Setting. 如果在此类设置中指定了其他更新频道,则会在安装后的下一次更新周期中执行频道切换。If there is such setting with a different update channel, the channel switch is performed after the installation during the next update cycle. 有关详细信息,请参阅对 Microsoft 365 应用版的更新频道所做的更改For more information, see Change the Microsoft 365 Apps update channel.

有关更新频道的详细信息,请参阅 Microsoft 365 应用的更新频道概述For more information about update channels, see Overview of update channels for Microsoft 365 Apps.

允许值:Allowed values:

  • Channel="BetaChannel"Channel="BetaChannel"
  • Channel="CurrentPreview"Channel="CurrentPreview"
  • Channel="Current"Channel="Current"
  • Channel="MonthlyEnterprise"Channel="MonthlyEnterprise"
  • Channel="SemiAnnualPreview"Channel="SemiAnnualPreview"
  • Channel="SemiAnnual"Channel="SemiAnnual"

备注

  • 若要使用这些属性值,你需要使用版本最低为 16.0.12827.20268 的 Office 部署工具(发布于 2020 年 6 月 9 日)。To use these attribute values, you need to be using at least version 16.0.12827.20268 of the Office Deployment Tool, which was released on Tuesday June 9, 2020.
  • 以前的每更新频道允许值现仍可使用,这意味着你不必更新旧的配置 XML 文件。Previous allowed values for each update channel can still be used, which means you don't have to update your older configuration XML files.
  • Beta 版频道(有时称为“预览体验成员 - 快”)不是受支持的内部版本,因此只能由一小组选定用户(如 IT 人员或应用程序开发人员)在测试环境中使用。Beta Channel (sometimes referred to as Insider Fast) is not a supported build so should only be used in test environments and by a small group of select users, such as IT staff or application developers.

如果你正在部署 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. 如果未指定,则默认为 CDN。Defaults to the CDN if not specified.

在下载模式下运行 ODT 时,定义安装文件下载的位置。Defines where the installation files are downloaded from when running ODT in download mode. 最常用于将 Office 的特定语言和产品从网络上的一个中心位置分发到另一个位置。Most commonly used to distribute specific languages and products for Office from a central location on your network to another location. 请注意,使用 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)

可选。Optional. 如果未指定,则默认为 False。Defaults to False if not specified.

若要将 Office CDN 作为语言包的备份源,请在配置文件中包含“AllowCdnFallback”属性,如示例中所示。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="SemiAnnual" 
     AllowCdnFallback="True">
  <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
      <Language ID="ja-jp" />
  </Product>
</Add>  

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

可选。Optional. 如果未指定,则默认为 False。Defaults to False if not specified.

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

要详细了解如何使用 MigrateArch,请参阅将 Microsoft 365 应用安装项从 32 位更改为 64 位For more information about using MigrateArch, see Change a Microsoft 365 Apps installation from 32-bit to 64-bit.

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

可选。Optional. 如果未指定,则默认为 False。Defaults to False if not specified.

必须在安装了 Office 的计算机上启用 Office COM 对象,这样 Configuration Manager 才能管理Microsoft 365 应用更新。For Configuration Manager to be able to manage Microsoft 365 Apps 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 对象后,自动在 Microsoft 365 应用的帐户页面上为客户端设备启用“立即更新”选项。When the Office COM object is enabled, the Update Now option on the Account page for Microsoft 365 Apps is automatically disabled for client devices.

有关详细信息,请参阅使用 Microsoft Endpoint Configuration Manager 管理 Microsoft 365 应用更新For more information, see Manage updates to Microsoft 365 Apps with Microsoft Endpoint Configuration Manager.

允许值:Allowed values:

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

示例Example

<Configuration>
  <Add OfficeClientEdition="64" Channel="Current" 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 元素将语言包添加到现有 Microsoft 365 应用安装中。You can also use the Product element to add language packs to existing installations of Microsoft 365 Apps. 更多详细信息,包括示例配置文件,请参阅向现有 Microsoft 365 应用安装部署语言For more information, including an example configuration file, see Deploy languages to existing installations of Microsoft 365 Apps.

示例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)

必填。Required.

定义要下载或安装的产品 ID。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

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

可选。Optional.

基于是否已在设备上安装了特定的基于 MSI 的 Office 产品,使你能够根据 ID 属性中所指定的方式控制 Office 产品的安装。Allows you to control the installation of an Office product, as specified by the ID attribute, based on whether a particular MSI-based Office product is already installed on the device. 例如,如果设备上已安装了基于 MSI 的 Project Professional 版本,请安装 Project Online 桌面客户端。For example, if an MSI-based version of Project Professional is already installed on the device, then install Project Online Desktop Client.

可指定由 Windows Installer (MSI) 安装的任何 Office 产品,但 MSICondition 最常用于 Project 或 Visio 安装。You can specify any Office product that was installed by Windows Installer (MSI), but MSICondition is most commonly used for Project or Visio installations. 只要产品的版本是使用 MSI 安装的,MSICondition 属性所指定的值就可以是产品的批量许可或零售版本。The value that you specify for the MSICondition attribute can be either a volume licensed or a retail version of the product, as long as that version of the product was installed by using MSI.

MSICondition 将识别你指定的 Office 产品的 2007、2010、2013 和 2016 版本。MSICondition will recognize 2007, 2010, 2013, and 2016 versions of the Office product that you specify. 但是,不能指定特定版本。But, you can't specify a particular version. 例如,你不能对 Visio Standard 2013 指定 MSICondition 的外观。For example, you can't have MSICondition look specifically for Visio Standard 2013. MSICondition 将查找所有基于 MSI 的 Visio 标准安装,包括 Visio Standard 2007、Visio Standard 2010、Visio Standard 2013 和 Visio Standard 2016。MSICondition will look for all MSI-based installations of Visio Standard, including Visio Standard 2007, Visio Standard 2010, Visio Standard 2013, and Visio Standard 2016.

产品 ID 是在 Office 旧版本安装文件的 {product}.WW 文件夹内的 Setup.xml 文件中找到的安装程序 ID。The value that you specify for the MSICondition attribute is the Setup ID that is found in the Setup.xml file in the {product}.WW folder of the installation files for your existing version of the Office product. 例如,可在 ProPlus.WW 文件夹中找到 Visio 专业版 2016 的 Setup.xml 文件。For example, the Setup.xml file for Visio Professional 2016 is found in the VisPro.WW folder. 可指定 Office 产品的多个类型(用逗号分隔)。You can specify multiple types of an Office product, separated by a comma. 例如,可指定 "PrjStd,PrjStdR,PrjPro,PrjProR" 以查找 Project Standard 或 Project Professional 批量许可或零售的安装。For example, you can specify "PrjStd,PrjStdR,PrjPro,PrjProR" to look for installations of Project Standard or Project Professional, either volume licensed or retail.

备注

  • 建议在安装 XML 文件中所指定产品的过程中删除基于 MSI 的现有 Office 产品。We recommend that you remove the existing MSI-based Office products as part of installing the products specified in your XML file. 若要删除基于 MSI 的现有产品,请使用 RemoveMSI 元素To remove existing MSI-based products, use the RemoveMSI element.

MSICondition 属性示例Example of MSICondition attribute

在下面的示例中,仅当设备上已安装了基于 MSI 的 Project Standard 时,才会在设备上安装 Project Online 桌面客户端。In the following example, Project Online Desktop Client will be installed on the device only if an MSI-based version of Project Standard is already installed on the device. 此外,安装 Project Online 桌面客户端时,将从设备中删除 Project Standard。Also, Project Standard will be removed from the device as part of the installation of Project Online Desktop Client.

<Configuration>
  <Add >
      <Product ID="ProjectProRetail" MSICondition="PrjStd,PrjStdR">
         <Language ID="en-us" />
         <Language ID="MatchPreviousMSI">
      </Product>
  </Add>
  <RemoveMSI />
</Configuration>

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.

示例Example

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

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

必填。Required.

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

示例值Example values

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

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

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

如果 Office 不支持操作系统语言,或 ODT 无法在本地源文件中找到正确的语言包,MatchOS 和 MatchInstalled 将无法安装该语言。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. 为帮助解决此问题,建议指定备用语言并允许 ODT 对缺失的文件使用 Office CDN。To help address this issue, we recommend that you specify a backup language and allow the ODT to use the Office CDN for missing files. 可使用 Fallback 和 AllowCdnFallBack 属性完成此操作。To do so, use the Fallback attribute and AllowCdnFallBack attribute.

MatchInstalled 仅在已安装至少一个即点即用产品的情况下才能使用。MatchInstalled can be used only if there is at least one Click-to-Run product already installed. 无法将其用于 ODT 的 /download 开关。It can't be used with the /download switch for the ODT. 有关 MatchInstalled 的详细信息,请参阅部署语言概述为 Microsoft 365 应用版构建动态、精益和通用程序包For more information about MatchInstalled, see Overview of deploying languages and Build dynamic, lean, and universal packages for Microsoft 365 Apps.

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

可选。Optional.

使用 MatchOS 时,当 Office 不支持匹配语言或在本地源文件中找不到匹配语言时,建议指定要安装的回退语言。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 information, see Install the same languages as the operating system.

示例值:Example values:

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

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

可选。Optional.

使用 MatchInstalled 时,必须指定是要匹配已安装的特定产品还是所有已安装语言。When using MatchInstalled, you have to specify if you want to match a specific already installed product or the sum of all already installed languages. 若要面向特定产品,可指定任何受支持的产品 IDTo target a specific product, you can specify any supported product ID. 如果想要匹配已安装的所有语言,可指定 "All"。If you want to match all already installed languages, you can specify "All". 然后,ODT 将使用 TargetProduct 中指定的同一组语言安装新产品。ODT will then install the new product with the same set of languages as the one specified in TargetProduct.

示例值:Example values:

  • <Language ID="MatchInstalled" TargetProduct="O365ProPlusRetail"<Language ID="MatchInstalled" TargetProduct="O365ProPlusRetail"
  • <Language ID="MatchInstalled" TargetProduct="All"<Language ID="MatchInstalled" TargetProduct="All"

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)

可选。Optional. 如果未指定,则默认设置为 FullDefault is set to Full if not specified.

如果 Level 设置为 None,Office 安装不带用户界面:不显示进度条、完成屏幕、错误消息或其他用户界面。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.

允许值:Allowed values:

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

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

可选。Optional. 如果未指定,则默认为 FALSEDefaults to FALSE if not specified.

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

允许值:Allowed values:

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

备注

如果部署的 Office 版本早于版本 1803,仅当使用用户帐户安装时才会应用此设置。Microsoft Endpoint 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. Microsoft Endpoint Configuration Manager and other software distribution tools that use the SYSTEM account for installation will not apply the setting.

ExcludeApp 元素ExcludeApp element

定义不应安装的 Microsoft 365 应用产品。Defines which Microsoft 365 Apps products should not be installed. 如果你安装 Microsoft 365 应用版或安装各个应用程序(如 Word、Excel、PowerPoint、Publisher、Visio 或 Skype),OneDrive 会自动安装。OneDrive is automatically installed when you install Microsoft 365 Apps or install individual applications, such as Word, Excel, PowerPoint, Publisher, Visio, or Skype. 如果不希望 OneDrive 与以上应用程序一同安装,请使用 ExcludeApp 元素将其删除。If you don't want OneDrive installed with those applications, use the ExcludeApp element to remove it. 有关详细信息,请参阅在安装 Microsoft 365 应用或其他应用程序时排除 OneDriveFor more information, see Exclude OneDrive when installing Microsoft 365 Apps or other applications.

示例Example

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

如果在已安装 Microsoft 365 应用的设备上使用带 ExcludeApp 的配置文件安装 Office,则 ExcludeApp 设备的处理方式将存在不同,具体取决于下述语言列表:If a configuration file with ExcludeApp is used to install Office on a device that already has Microsoft 365 Apps 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 languages, 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)

必填。Required.

定义不应安装的产品的 ID。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,请参阅使用 Microsoft 365 应用部署 Microsoft Teams.For more information about Microsoft Teams, see Deploy Microsoft Teams with Microsoft 365 Apps.

Logging 元素Logging element

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

示例Example

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

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

可选。Optional. 如果未指定,则默认为 StandardDefault is Standard if not specified.

打开或关闭日志记录。Turns logging on or off.

允许值:Allowed values:

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

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

可选。Optional. 如果未指定,则默认为 %temp%Default is %temp% if not specified.

定义日志文件的位置。Defines the location of the log files.

示例值: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="DeviceBasedLicensing" 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)

可选。Optional. 如果未指定,则默认为 0Default is 0 if not specified.

因为 Microsoft 365 应用已设置为自动激活,所以不需要为 Microsoft 365 应用产品设置此属性。Because Microsoft 365 Apps is set to activate automatically, you should not set this property for Microsoft 365 Apps products. 对于其他产品,你可以将“自动激活”设为 1,以自动激活该产品。For other products, you can set AUTOACTIVATE to 1 to have the product activate automatically.

允许值: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)

可选。Optional. 如果未指定,则默认为 FALSEDefault is FALSE if not specified.

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

允许值: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)

可选。Optional.

默认情况下,ODT 创建的 App-V 包共享同一个 App-V 包 ID。By default, App-V packages created by the ODT share the same App-V Package ID. 管理员可以使用 PACKAGEGUID 指定另一个包 ID。Administrators can use PACKAGEGUID to specify a different Package ID. 借此,可将多个 Office 的 App-V 包发布到 App-V 管理服务器。This allows you to publish multiple App-V packages of Office to an App-V Management Server. 但是,不能通过此选项将多个 Office 的 App-V 包部署到单台计算机。But, this doesn't enable you to deploy more than one Office App-V package to a single computer. 可以使用 ODT 为 Microsoft 365 应用创建 APP-V 包。You can use the ODT to create App-V packages for Microsoft 365 Apps. 不支持创建 Office 专业增强版或 Office 标准版的批量许可版本的程序包。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.

示例值: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)

可选。Optional. 如果未指定,则默认值为 0Default value is 0 if not specified.

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

有关详细信息,请参阅 Microsoft 365 应用共享计算机激活概述For more information, see Overview of shared computer activation for Microsoft 365 Apps.

允许值: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)

可选。Optional. 如果未指定,则默认值为 0Default value is 0 if not specified.

如果使用的是共享计算机激活,并且想要漫游许可令牌,请将 SCLCacheOverride 设置为 1。Set SCLCacheOverride to 1 if you're using shared computer activation and you want to roam the licensing token. 与 SCLCacheOverrideDirectory 配合使用。Use in conjunction with SCLCacheOverrideDirectory. 只有在选择从默认位置删除许可令牌时才需要。This is only needed if you choose to move the licensing token from its default location. 有关详细信息,请参阅 Microsoft 365 应用共享计算机激活概述For more information, see Overview of shared computer activation for Microsoft 365 Apps.

允许值: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)

可选。Optional.

如果使用的是共享计算机激活,并且想要漫游许可令牌,设置 SCLCacheOverrideDirectory 指定许可标记的文件夹位置。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. 将与 SCLCacheOverride 结合使用。Use in conjunction with SCLCacheOverride. 只有在选择从默认位置删除许可令牌时才需要。This is only needed if you choose to move the licensing token from its default location.

有关详细信息,请参阅 Microsoft 365 应用共享计算机激活概述For more information, see Overview of shared computer activation for Microsoft 365 Apps.

示例值: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%"

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

可选。Optional. 如果未指定,则默认值为 0Default value is 0 if not specified.

定义了适用于基于设备激活的 Office 许可模式。Defines the Office licensing mode for device-based activation. 有关更多信息,请参阅适用于 Microsoft 365 企业应用版的基于设备的许可For more information, see Device-based licensing for Microsoft 365 Apps for enterprise.

允许值:Allowed values:

  • 属性名称 ="DeviceBasedLicensing" Value="1"Property Name="DeviceBasedLicensing" Value="1"
  • 属性名称 ="DeviceBasedLicensing" Value="0"Property Name="DeviceBasedLicensing" Value="0"

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

可选。Optional. 如果未指定,则默认值为 TrueThe default value is True if not specified.

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

允许值:Allowed values:

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

备注

Windows 7 不再支持 Microsoft 365 应用版。Microsoft 365 Apps is no longer supported on Windows 7. 有关更多详细信息,请参阅 Windows 7 终端支持和 Microsoft 365 应用版For more information, see Windows 7 end of support and Microsoft 365 Apps.

Remove 元素Remove element

定义要从旧 Microsoft 365 应用安装中删除哪些产品和语言。Defines which products and languages to remove from a previous installation of Microsoft 365 Apps. 若要删除已安装的语言,必须同时提供产品和语言,如示例所示。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)

可选。Optional. 如果未指定,则默认值为 FALSEThe default value is FALSE is not specified.

如果设置为 TRUE,将删除所有 Microsoft 365 应用产品和语言,包括 Project 和 Visio。If set to TRUE, all Microsoft 365 Apps products and languages will be removed, including Project and Visio.

允许值: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="SemiAnnual" />

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

可选。Optional. 如果未指定,则默认值为 TRUEThe default value is TRUE if not specified.

如果设置为 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.

允许值:Allowed values:

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

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

可选。Optional. 如果未指定,则默认为 CDN。Defaults to the CDN if not specified.

定义 Office 更新来自何处。Defines where the updates for Office come from. UpdatePath 可以为 Office 安装文件源指定网络、本地或 HTTP 路径。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.

示例值:Example values:

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

可选。Optional. 默认为指定更新路径中的最新版本。Defaults to the latest version from the specified update path.

定义要更新到的 Office 版本。Defines which version Office updates to. 如果 TargetVersion 设置为特定内部版本号,则 Office 会尝试更新到该版本。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.

示例值:Example values:

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

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

可选。Optional.

定义必须应用更新的截止时间。截止时间使用协调世界时 (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.

用户将在截止时间之前收到多个安装更新的提醒。Prior to the deadline, users receive multiple reminders to install the updates. 如果未在截止时间之前更新 Office,用户会看到一个通知,指示将在 15 分钟后更新。If Office isn't updated by the deadline, users see a notification that the updates will be applied in 15 minutes. 这就使用户可以保存正在运行的 Office 文档,并关闭所有打开的 Office 程序。This gives users the opportunity to save the Office documents that they are working on and to close any Office programs that are open. 如果用户未关闭 Office 程序,则程序会在 15 分钟后自动关闭,这可能导致数据丢失。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 程序后,将自动进行更新。After the Office programs are closed, the updates are applied automatically. 截止时间仅适用于一组更新。The deadline only applies to one set of updates. 如果要使用截止时间确保 Office 始终为最新版本,必须在每次 Office 的更新可用时更改截止时间。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.

示例值:Example value:

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

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

可选。Optional. 默认设置为 CurrentThe default is Current.

定义要在 Office 安装后用于进行更新的频道。Defines which channel to use for updating Office after it is installed. 有两个频道属性:Add 元素的频道用于在安装 Office 时指定更新频道,Update 元素的频道用于更改对应现有 Office 安装的频道。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 Updates element is used to change the channel for an existing installation of Office.

有关更新频道的详细信息,请参阅 Microsoft 365 应用的更新频道概述For more information about update channels, see Overview of update channels for Microsoft 365 Apps.

如果将组策略与 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.

允许值:Allowed values:

  • Channel="BetaChannel"Channel="BetaChannel"
  • Channel="CurrentPreview"Channel="CurrentPreview"
  • Channel="Current"Channel="Current"
  • Channel="MonthlyEnterprise"Channel="MonthlyEnterprise"
  • Channel="SemiAnnualPreview"Channel="SemiAnnualPreview"
  • Channel="SemiAnnual"Channel="SemiAnnual"

备注

  • 若要使用这些属性值,你需要使用版本最低为 16.0.12827.20268 的 Office 部署工具(发布于 2020 年 6 月 9 日)。To use these attribute values, you need to be using at least version 16.0.12827.20268 of the Office Deployment Tool, which was released on Tuesday June 9, 2020.
  • 以前的每更新频道允许值现仍可使用,这意味着你不必更新旧的配置 XML 文件。Previous allowed values for each update channel can still be used, which means you don't have to update your older configuration XML files.
  • Beta 版频道(有时称为“预览体验成员 - 快”)不是受支持的内部版本,因此只能由一小组选定用户(如 IT 人员或应用程序开发人员)在测试环境中使用。Beta Channel (sometimes referred to as Insider Fast) is not a supported build so should only be used in test environments and by a small group of select users, such as IT staff or application developers.

如果你正在部署 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.

安装指定产品(如 Microsoft 365 应用版)之前,指定是否从计算机卸载使用 Windows Installer (MSI) 安装的任何 2007、2010、2013 或 2016 版本的 Office、Visio 和 Project。Specifies whether any 2007, 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 Microsoft 365 Apps.

我们建议你在安装 Microsoft 365 应用版之前卸载 Office 的任何旧版本。We recommend that you uninstall any previous versions of Office before installing Microsoft 365 Apps. 有关使用 RemoveMSI 的详细信息,请参阅升级到 Microsoft 365 应用时删除现有 MSI 版本的 OfficeFor more information about using RemoveMSI, see Remove existing MSI versions of Office when upgrading to Microsoft 365 Apps.

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

可选。Optional.

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

示例值:Example values:

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

AppSettings 元素AppSettings element

可选。Optional.

定义 Microsoft 365 应用的应用程序首选项,包括 VBA 宏通知、默认文件位置和默认文件格式。Defines application preferences for Microsoft 365 Apps, including VBA Macro notifications, default file locations, and default file format. 若要使用应用程序首选项创建配置文件,建议使用即点即用 Office 自定义工具,这是一款具有完整用户界面的 Web 应用程序。To create a configuration file with application preferences, 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 preferences.

有关应用程序首选项的详细信息,请参阅应用应用程序首选项将应用程序首选项应用于 Office 的现有安装For more information about application preferences, see Apply application preferences and Apply application preferences to an existing installation of Office.

示例Example

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