Office 部署工具的配置选项

With the Office Deployment Tool (ODT), you can download and deploy Microsoft 365 Apps 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.

备注

Best practice: The options in this article show the XML elements and attributes in the configuration file. You can continue to create the configuration file in a text editor, but we recommend using the Office Customization Tool instead. With the Office Customization Tool, you can easily create and modify configuration files in a web-based interface. For more information, see Overview of the Office Customization Tool.

标准配置文件示例

ODT 包含两个文件:setup.exe和configuration.xml。 若要使用该工具,请编辑配置文件以定义所需的选项,然后从命令行运行setup.exe。 例如,可以编辑配置文件以下载 64 位英语版 Office,也可以编辑该文件以安装 64 位英语版 Office,且 EULA 自动接受且没有发布服务器。

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 安装到客户端计算机

<Configuration>
  <Add SourcePath="\\Server\Share" 
       OfficeClientEdition="64"
       Channel="MonthlyEnterprise" >
    <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" />  
</Configuration>
说明
Add SourcePath="\\Server\Share"
将 Office 下载到网络上的“\\server\share”,并使用此位置上的安装文件进行部署。
添加 OfficeClientEdition=“64”
下载并安装 64 位版本的 Office
Add Channel=“MonthlyEnterprise”
将使用每月企业频道安装 Office。
Product ID="O365ProPlusRetail"
下载并安装 Microsoft 365 企业应用版。
Language ID="en-us"
Language ID="ja-jp"
下载并安装英语版和日语版 Office。
Updates Enabled="TRUE"
Office 检查更新。
Updates UpdatePath="\\Server\Share"
Office 将检查网络上的“\server\share”是否有更新。
Display Level="None" AcceptEULA="TRUE"
当安装 Office 时,不显示用户界面。

备注

现已无法将日志元素作为 Office 部署工具的配置选项。 可以在用户的 %temp% 文件夹以及 C:\Windows\Temp 中找到日志文件。

Add元素

定义要下载或安装的产品和语言

示例

<Add SourcePath="\\Server\Share" 
     OfficeClientEdition="64"
     Channel="MonthlyEnterprise"
     Version="16.0.15330.20306" >
  <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 元素)

可选。

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.

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.

示例值:

  • SourcePath="\\server\share"
  • SourcePath="C:\Downloads\Microsoft"

SourcePath 值不应包括 /Office 部件或下载 Office 数据的文件夹的名称。

Version 属性(属于 Add 元素的)

Optional. Defaults to the latest version available if not specified.

When you use the Version attribute, we recommend including the Channel attribute as well. If you don't include the Channel attribute, the default channel will be used, which might not match the specified version.

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. This setting can make it easier to add language packs or Visio and Project without updating Office to a newer version.

示例值:

  • 版本=“16.0.15330.20306”
  • Version="MatchInstalled"

OfficeClientEdition 属性(属于 Add 元素)

可选。

定义是下载/安装 32 位还是 64 位版本的 Microsoft 365 应用。 如果设备上未安装 Office 且未指定 OfficeClientEdition,则 ODT 将默认为 64 位版本,除非设备运行的是 32 位版本的 Windows 或 RAM 小于 4 GB。 如果已安装 Office,但未指定 OfficeClientEdition,则 ODT 将与 Office 现有安装项的体系结构相匹配。 如果已安装 Office 且已指定 OfficeClientEdition,则它必须与已安装的体系结构相匹配。 否则,安装将失败,因为不支持混合体系结构。

允许值:

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

Channel 属性(属于 Add 元素)

可选。

Defines which channel to use for installing Office. 如果设备上未安装 Office,则 Channel 属性的默认设置为 Current。 如果在设备上安装了 Office 并且未指定通道属性,则 ODT 将与现有安装的通道匹配。

此值将决定要安装的频道,不考虑是否在 Updates 元素中或通过组策略设置指定了更新频道。 如果存在具有不同更新通道的此类设置,则会在下一个更新周期安装后执行通道切换。 有关详细信息,请参阅对 Microsoft 365 应用版的更新频道所做的更改

有关更新频道的详细信息,请参阅 Microsoft 365 应用的更新频道概述

允许值:

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

备注

  • 若要使用这些属性值,你需要使用版本最低为 16.0.12827.20268 的 Office 部署工具(发布于 2020 年 6 月 9 日)。
  • 以前的每更新频道允许值现仍可使用,这意味着你不必更新旧的配置 XML 文件。
  • Beta 版频道(有时称为“预览体验成员 - 快”)不是 受支持的内部版本,因此只能由一小组选定用户(如 IT 人员或应用程序开发人员)在测试环境中使用。

如果要部署 Office LTSC 专业增强版 2021 或 Office LTSC 标准版 2021(即 Office 的批量许可版本),则需要使用其他更新通道:永久 VL2021。 有关详细信息,请参阅 Office LTSC 2021更新频道

如果要部署 Office 专业增强版 2019 或 Office Standard 2019(即批量许可版本的 Office),则需要使用其他更新通道:永久VL2019。 有关详细信息,请参阅 Office 2019 更新通道

DownloadPath 属性(属于 Add 元素)

Optional. Defaults to the CDN if not specified.

Defines where the installation files are downloaded from when running ODT in download mode. Most commonly used to distribute specific languages and products for Office from a central location on your network to another location. Note that you must specify a version when using DownloadPath, as shown in the example.

示例值:

  • DownloadPath="\\servera\share"

示例

<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 元素)

Optional. Defaults to False if not specified.

若要将 Office CDN 作为语言包的备份源,请在配置文件中包含“AllowCdnFallback”属性,如示例中所示。

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.

允许值:

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

示例

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

MigrateArch 属性(属于 Add 元素)

Optional. Defaults to False if not specified.

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. 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 位

OfficeMgmtCOM 属性(属于 Add 元素)

可选。 如果未指定,则默认为 False。

如果设置为 True,则会注册 COM 对象,这是允许更新管理解决方案 ((例如 Microsoft Configuration Manager) )管理 Office 更新所必需的。 使用 Configuration Manager 进行Microsoft 365 应用版更新时是必需的。 启用 Office COM 对象后,自动在 Microsoft 365 应用的帐户页面上为客户端设备启用“立即更新”选项。

有关详细信息,请参阅使用 Microsoft Configuration Manager 管理Microsoft 365 应用版的更新

允许值:

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

示例

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

Product 元素

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.

You can also use the Product element to add language packs to existing installations of Microsoft 365 Apps. For more information, including an example configuration file, see Deploy languages to existing installations of Microsoft 365 Apps.

示例

<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。

示例值:

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

有关所有受支持的产品 ID 的列表,请参阅 Office 部署工具支持的即点即用产品 ID

MSICondition 属性(属于 Product 元素)

可选。

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. For example, if an MSI-based version of Project Professional is already installed on the device, then install Project Online Desktop Client.

You can specify any Office product that was installed by Windows Installer (MSI), but MSICondition is most commonly used for Project or Visio installations. 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 will recognize 2007, 2010, 2013, and 2016 versions of the Office product that you specify. But, you can't specify a particular version. For example, you can't have MSICondition look specifically for Visio Standard 2013. 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.

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. For example, the Setup.xml file for Visio Professional 2016 is found in the VisPro.WW folder. You can specify multiple types of an Office product, separated by a comma. For example, you can specify "PrjStd,PrjStdR,PrjPro,PrjProR" to look for installations of Project Standard or Project Professional, either volume licensed or retail.

备注

  • We recommend that you remove the existing MSI-based Office products as part of installing the products specified in your XML file. To remove existing MSI-based products, use the RemoveMSI element.

MSICondition 属性示例

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. 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 元素

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.

示例

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

ID 属性(属于 Language 元素)

必填。

定义要下载或安装的语言 ID。

示例值

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

有关所有语言的列表,请参阅语言、区域性代码和伴随校对语言

有关 MatchPreviousMSI 的详细信息,请参阅在升级到 Microsoft 365 应用版时删除现有 MSI 版本的 Office

如果 Office 不支持该语言,或者 ODT 在本地源文件中找不到正确的语言包,则 MatchOS 和 MatchInstalled 无法安装操作系统语言。 为帮助解决此问题,建议指定备用语言并允许 ODT 对缺失的文件使用 Office CDN。 可使用 Fallback 和 AllowCdnFallBack 属性完成此操作。

MatchInstalled can be used only if there is at least one Click-to-Run product already installed. It can't be used with the /download switch for the ODT. For more information about MatchInstalled, see Overview of deploying languages and Build dynamic, lean, and universal packages for Microsoft 365 Apps.

Fallback 属性(属于 Language 元素)

可选。

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.

示例值:

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

TargetProduct 属性(属于 Language 元素)

可选。

When using MatchInstalled, you can specify if you want to match the list of already installed languages for a specific product or the combination of all installed products. To target a specific product, you can specify any supported product ID. If you want to match the languages of all already installed products, you specify "All". ODT will then install the new product with the same set of languages as the one specified in TargetProduct.

如果没有使用 MatchInstalled 指定 TargetProduct,则 ODT 将尝试匹配配置文件中语言标记所属的同一产品 ID。 例如,如果在不使用 TargetProduct 的情况下安装“VisioProRetail”时使用 MatchInstalled,则 ODT 将尝试匹配此产品已安装的语言。

示例值:

<Language ID="MatchInstalled" TargetProduct="O365ProPlusRetail" />
<Language ID="MatchInstalled" TargetProduct="All" />

Display 元素

定义安装 Office 时用户看到的内容。

示例

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

Level 属性(属于 Display 元素的)

Optional. Default is set to Full if not specified.

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

如果 Level 设置为 Full,安装 Office 时将提供正常安装体验。

允许值:

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

AcceptEULA 属性(属于 Display 元素)

可选。 如果未指定,则默认为 FALSE

如果 AcceptEULA 设置为 TRUE,则用户不会看到“Microsoft 软件许可条款”对话框。 如果此属性设置为 FALSE 或未包含在内,则用户可能会看到“Microsoft 软件许可条款”对话框。 建议管理员将 AcceptEULA 设置为 TRUE

允许值:

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

备注

如果部署版本 1803 之前的 Office 版本,则仅当使用用户帐户进行安装时,才会应用此设置。 Microsoft Configuration Manager 和其他使用 SYSTEM 帐户进行安装的软件分发工具将不应用此设置。

ExcludeApp 元素

定义不应安装哪些Microsoft 365 应用版产品。 如果你安装 Microsoft 365 应用版或安装各个应用程序(如 Word、Excel、PowerPoint、Publisher、Visio 或 Skype),OneDrive 会自动安装。 如果不希望 OneDrive 与以上应用程序一同安装,请使用 ExcludeApp 元素将其删除。 有关详细信息,请参阅在安装 Microsoft 365 应用或其他应用程序时排除 OneDrive

示例

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

如果在已安装 Microsoft 365 应用版的设备上使用带 ExcludeApp 的配置文件安装 Office,则 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 设置结合使用。

ID 属性(属于 ExcludeApp 元素)

必填。

定义不应安装的产品的 ID。

允许值:

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

For OneDrive for Business, use Groove. For Skype for Business, use Lync.

要详细了解 Microsoft Teams,请参阅使用 Microsoft 365 应用版部署 Microsoft Teams

Property 元素

定义特定 Office 行为和属性。

示例

<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 元素)

必填。

定义想要设置其值的特定属性。

Value 属性(属于 Property 元素)

定义命名属性的值。

AUTOACTIVATE 属性(属于 Property 元素)

可选。 如果未指定,则默认为 0

由于Microsoft 365 应用版设置为自动激活,因此不应为Microsoft 365 应用版产品设置此属性。 对于其他产品,你可以将“自动激活”设为 1,以自动激活该产品。

允许值:

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

FORCEAPPSHUTDOWN 属性(属于 Property 元素)

Optional. Default is FALSE if not specified.

When set to TRUE, forces any apps that are blocking the install of Office to shut down. Data loss may occur.

允许值:

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

PACKAGEGUID 属性(属于 Property 元素)

可选。

默认情况下,ODT 创建的 App-V 包共享同一个 App-V 包 ID。 管理员可以使用 PACKAGEGUID 指定另一个包 ID。 借此,可将多个 Office 的 App-V 包发布到 App-V 管理服务器。 但是,不能通过此选项将多个 Office 的 App-V 包部署到单台计算机。 可以使用 ODT 为 Microsoft 365 应用创建 APP-V 包。 不支持为 Office Professional Plus 或 Office Standard 的批量许可版本创建包。

包 ID 必须遵循示例中的格式,并且只能使用下面这些字符:0、1、2、3、4、5、6、7、8、9、A、B、C、D、E、F

如果使用其他任何字符,创建的 APP-V 包使用默认包 ID。

示例值:

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

SharedComputerLicensing 属性(属于 Property 元素)

Optional. Default value is 0 if not specified.

如果使用远程桌面服务将 Microsoft 365 应用版部署到共享计算机,请将 SharedComputerLicensing 设置为 1。

有关详细信息,请参阅 Microsoft 365 应用共享计算机激活概述

允许值:

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

SCLCacheOverride 属性(属于 Property 元素)

Optional. Default value is 0 if not specified.

Set SCLCacheOverride to 1 if you're using shared computer activation and you want to roam the licensing token. Use in conjunction with SCLCacheOverrideDirectory. This is only needed if you choose to move the licensing token from its default location. For more information, see Overview of shared computer activation for Microsoft 365 Apps.

允许值:

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

SCLCacheOverrideDirectory 属性(属于 Property 元素)

可选。

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. This is only needed if you choose to move the licensing token from its default location.

有关详细信息,请参阅 Microsoft 365 应用版共享计算机激活概述

示例值:

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

DeviceBasedLicensing 属性(属于 Property 元素)

Optional. Default value is 0 if not specified.

Defines the Office licensing mode for device-based activation. For more information, see Device-based licensing for Microsoft 365 Apps for enterprise.

允许值:

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

PinIconsToTaskBar 属性(属于 Property 元素)

可选。 如果未指定,则默认值为 True

定义是否将 Office 产品的快捷方式图标添加到 Windows 7 和 8.1 中的 Windows 任务栏。 如果使用系统帐户(使用 Microsoft Configuration Manager进行部署时很常见)安装 Office,则即使此属性设置为 True,也不会固定图标。

允许值:

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

备注

Microsoft 365 Apps is no longer supported on Windows 7. For more information, see Windows 7 end of support and Microsoft 365 Apps.

Remove 元素

定义要从旧 Microsoft 365 应用安装中删除哪些产品和语言。 若要删除已安装的语言,必须同时提供产品和语言,如示例所示。 若要删除所有已安装的语言,请不要包含语言属性。 在这种情况下,ODT 会自动发现并删除产品的所有已安装语言。

有关详细信息,请参阅 Office 部署工具概述

示例

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

All 属性(属于 Remove 元素)

Optional. The default value is FALSE if not specified.

如果设置为 TRUE,将删除所有 Microsoft 365 应用产品和语言,包括 Project 和 Visio。

允许值:

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

Updates 元素

定义如何在安装后更新 Office。

示例

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

Enabled 属性(属于 Updates 元素)

Optional. The default value is TRUE if not specified.

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.

允许值:

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

UpdatePath 属性(属于 Updates 元素)

Optional. Defaults to the CDN if not specified.

Defines where the updates for Office come from. 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.

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.

示例值:

  • UpdatePath="\\server\share"
  • UpdatePath="C:\Preload\Office"
  • UpdatePath="http://internalApps/Office/"

TargetVersion 属性(属于 Updates 元素)

Optional. Defaults to the latest version from the specified update path.

Defines which version Office updates to. If TargetVersion is set to a specific build number, Office attempts to update to that version.

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.

示例值:

  • TargetVersion=“16.0.12345.12345”
  • TargetVersion=""

Deadline 属性(属于 Updates 元素)

可选。

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,用户会看到一个通知,指示将在 15 分钟后更新。 这使用户有机会保存他们正在处理的 Office 文档,并关闭任何打开的 Office 程序。 如果用户未关闭 Office 程序,则程序会在 15 分钟后自动关闭,这可能导致数据丢失。

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.

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.

示例值:

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

Channel 属性(属于 Updates 元素)

可选。 默认设置为 Current

定义安装后用于更新 Office 的通道。 有两个频道属性:Add 元素的频道用于在安装 Office 时指定更新频道,Update 元素的频道用于更改对应现有 Office 安装的频道。

有关更新频道的详细信息,请参阅 Microsoft 365 应用的更新频道概述

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.

允许值:

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

备注

  • 若要使用这些属性值,你需要使用版本最低为 16.0.12827.20268 的 Office 部署工具(发布于 2020 年 6 月 9 日)。
  • 以前的每更新频道允许值现仍可使用,这意味着你不必更新旧的配置 XML 文件。
  • Beta 版频道(有时称为“预览体验成员 - 快”)不是 受支持的内部版本,因此只能由一小组选定用户(如 IT 人员或应用程序开发人员)在测试环境中使用。

如果要部署 Office LTSC 专业增强版 2021 或 Office LTSC 标准版 2021(即 Office 的批量许可版本),则需要使用其他更新通道:永久 VL2021。 有关详细信息,请参阅 Office LTSC 2021更新频道

如果要部署 Office 专业增强版 2019 或 Office Standard 2019(即批量许可版本的 Office),则需要使用其他更新通道:永久VL2019。 有关详细信息,请参阅 Office 2019 更新通道

RemoveMSI 元素

可选。

安装指定产品(如 Microsoft 365 应用版)之前,指定是否从计算机卸载使用 Windows Installer (MSI) 安装的任何 2007、2010、2013 或 2016 版本的 Office、Visio 和 Project。

We recommend that you uninstall any previous versions of Office before installing Microsoft 365 Apps. For more information about using RemoveMSI, see Remove existing MSI versions of Office when upgrading to Microsoft 365 Apps.

IgnoreProduct 属性(属于 RemoveMSI 元素)

可选。

如果指定一个 ID,不会从计算机中卸载此 Windows Installer (MSI) 产品。

示例值:

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

AppSettings 元素

可选。

Defines application preferences for Microsoft 365 Apps, including VBA Macro notifications, default file locations, and default file format. 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 的现有安装

示例

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