在升级到 Microsoft 365 应用版时删除现有 MSI 版本 OfficeRemove existing MSI versions of Office when upgrading to Microsoft 365 Apps

我们建议你在安装 Microsoft 365 应用版之前卸载 Office 的任何旧版本。We recommend that you uninstall any previous versions of Office before installing Microsoft 365 Apps. 为了帮助卸载将 Windows Installer (MSI) 用作安装技术的 Office 版本,可以使用 Office 部署工具并在 configuration.xml 文件中指定 RemoveMSI 元素。To help you uninstall versions of Office that use Windows Installer (MSI) as the installation technology, you can use the Office Deployment Tool and specify the RemoveMSI element in your configuration.xml file.

安装 Microsoft 365 应用时,有多种方法可以使用 RemoveMSI 元素。There are several ways that you can use the RemoveMSI element when installing Microsoft 365 Apps.

  • 卸载计算机上的所有 Office 产品。Uninstall all Office products on the computer.
  • 识别任何现有语言资源(如语言包)并安装相同的语言。Identify any existing language resources, like language packs, and install the same languages.
  • 保留某些 Office 产品并卸载计算机上的所有其他 Office 产品。Keep some Office products and uninstall all other Office products on the computer.

RemoveMSI 可用于卸载2007、2010、2013或2016版本的 Office、Visio 或 Project,这些版本是使用 Windows Installer (MSI) 安装的。RemoveMSI can be used to uninstall 2007, 2010, 2013, or 2016 versions of Office, Visio, or Project that were installed using Windows Installer (MSI).

备注

RemoveMSI 不会卸载使用即点即用作为安装技术的以前版本的 Office(包括 Visio 和 Project)。RemoveMSI doesn’t uninstall prior versions of Office, including Visio and Project, that use Click-to-Run as the installation technology. 可以通过控制面板,或者通过运行 Office 部署工具并在 configuration.xml 文件中使用 Remove 元素来卸载这些版本的 Office。You can uninstall those versions of Office through Control Panel or by running the Office Deployment Tool and using the Remove element in your configuration.xml file.

使用 RemoveMSI 的要求Requirements for using RemoveMSI

下面是在 configuration.xml 文件中使用 RemoveMSI 元素的要求:The following are requirements for using the RemoveMSI element in your configuration.xml file:

  • 你必须使用最低版本 16.0.12827.20268 ( # A0 版本) 16.0.12827.20258 Office 部署工具的版本,可从 Microsoft 下载中心下载。You must be using at least version 16.0.12827.20268 (setupodt.exe version 16.0.12827.20258) of the Office Deployment Tool, which you can download from Microsoft Download Center. 我们建议你始终下载并使用最新版本的 Office 部署工具。We recommend that you always download and use the most current version of the Office Deployment Tool. 若要检查 Office 部署工具的版本,请右键单击 "setupodt.exe",选择 " 属性 ",然后选择 " 详细信息 "。To check the version of the Office Deployment Tool, right-click on setupodt.exe, choose Properties , and then choose Details.
  • 必须安装 Microsoft 365 应用的最低版本1803。You must be installing at least Version 1803 of Microsoft 365 Apps. 版本1803或更高版本在当前频道、每月企业频道、Semi-Annual 企业频道 (预览版) 和 Semi-Annual 企业频道中可用。Version 1803 or later is available in Current Channel, Monthly Enterprise Channel, Semi-Annual Enterprise Channel (Preview), and Semi-Annual Enterprise Channel.
  • 必须在运行 Windows 7 Service Pack 1 (SP1) 或更高版本的计算机上安装 Microsoft 365 应用。You must be installing Microsoft 365 Apps on a computer running at least Windows 7 Service Pack 1 (SP1) or above.

备注

Windows 7 支持将于 2020 年 1 月 14 日结束。Support for Windows 7 ended on January 14, 2020. 有关更多详细信息,请参阅 Windows 7 终端支持和 Microsoft 365 应用版For more information, see Windows 7 end of support and Microsoft 365 Apps.

卸载所有 Office 产品Uninstall all Office products

若要卸载计算机上已安装的所有 Office 版本(包括 Visio 和 Project),请将其添加 <RemoveMSI /> 到 configuration.xml 文件。To uninstall all versions of Office, including Visio and Project, that are already installed on the computer, add <RemoveMSI /> to your configuration.xml file. 语言资源(例如语言包、语言界面包或校对工具)也将被删除。Language resources – for example, language packs, language interface packs, or proofing tools – will also be removed.

下面是一个 configuration.xml 文件的示例,它通过 internet 上的 Office 内容交付网络 (CDN) 安装64位当前通道版本的 Microsoft 365 应用,并在计算机上卸载任何 Windows Installer (MSI) 版本的 Office。Here’s an example of a configuration.xml file that installs the 64-bit Current Channel version of Microsoft 365 Apps for enterprise in English from the Office Content Delivery Network (CDN) on the internet and uninstalls any Windows Installer (MSI) versions of Office on the computer.

<Configuration>
  <Add OfficeClientEdition="64" Channel="Current" >
      <Product ID="O365ProPlusRetail">
         <Language ID="en-us" />
      </Product>
  </Add>
  <RemoveMSI />
</Configuration>

安装相同的语言资源Install the same language resources

如果已在计算机上安装了语言资源(例如语言包、语言界面包或校对工具),则可以在安装 Microsoft 365 应用时获取所安装的相同语言资源的即点即用版本。If there are language resources – for example, language packs, language interface packs, or proofing tools – already installed on the computer, you can get Click-to-Run versions of the same language resources installed when you install Microsoft 365 Apps. 若要安装相同的语言资源,请添加 <Language ID="MatchPreviousMSI" /> 到 configuration.xml 文件。To install the same language resources, add <Language ID="MatchPreviousMSI" /> to your configuration.xml file.

下面是一个 configuration.xml 文件的示例,该文件中安装了 Microsoft 365 应用 for enterprise 的64位企业版频道版本,以及计算机上的任何现有语言,从 internet 上的 Office 内容交付网络 (CDN) ,然后在计算机上卸载任何 Windows Installer (MSI) 版本的 Office。Here’s an example of a configuration.xml file that installs the 64-bit Monthly Enterprise Channel version of Microsoft 365 Apps for enterprise in English, along with any existing languages on the computer, from the Office Content Delivery Network (CDN) on the internet and uninstalls any Windows Installer (MSI) versions of Office on the computer.

<Configuration>
  <Add OfficeClientEdition="64" Channel="MonthlyEnterprise" >
      <Product ID="O365ProPlusRetail">
         <Language ID="en-us" />
         <Language ID="MatchPreviousMSI" />
      </Product>
  </Add>
  <RemoveMSI />
</Configuration>

下面是有关在 configuration.xml 文件中使用 MatchPreviousMSI 的一些其他详细信息。The following are some additional details about using MatchPreviousMSI in your configuration.xml file.

  • 必须包括 RemoveMSI 元素。You must include the RemoveMSI element.
  • 至少必须指定一个语言 ID。You must specify at least one language ID. 例如,en-us。For example, en-us.
  • 该设置不是特定于产品的。The setting isn’t product specific. 例如,如果安装了德语法语和 Visio 标准版2013中的 Office 专业增强版2013,则在安装 Microsoft 365 应用时,你将获得法语和德语以及你指定的任何其他语言 Id。For example, if Office Professional Plus 2013 in French and Visio Standard 2013 in German are installed, you will get both French and German, along with any other language IDs you have specified, when you install Microsoft 365 Apps.

重要

如果要从本地网络上的某个位置(如共享文件夹)安装 Microsoft 365 应用,请确保已将所有可能的语言文件下载到该文件夹。If you’re installing Microsoft 365 Apps from a location on your local network, such as a shared folder, make sure you’ve downloaded all the possible language files to that folder. 如果你需要安装的任何语言在该文件夹中不可用,则安装将继续,但不会安装这些语言。If any of the languages needed to install aren't available in that folder, the installation will continue but without those languages being installed. 为了避免这种情况,我们建议在 configuration.xml 文件中包括 AllowCdnFallback = "True"To avoid this situation, we recommend that you include AllowCdnFallback="True" in your configuration.xml file. 这会将 Internet 上的 Office 内容交付网络 (CDN) 用作安装语言文件的备份来源。This will use the Office Content Delivery Network (CDN) on the internet as a backup source from which to install the language files.

保留某些 Office 产品,并卸载所有其他 Office 产品Keep some Office products and uninstall all other Office products

我们建议你在安装新版本之前卸载 Office 的任何旧版本(包括 Visio 和 Project)。We recommend that you uninstall any previous versions of Office, including Visio and Project, before installing the newer version. 但是,在某些情况下(例如进行应用程序兼容性测试时),可能需要在过渡到新版本时保留以前安装的版本一段有限的时间。But, in a few cases, such as for application compatibility testing, you might need to keep a previous version installed for a limited time while you transition to the new version.

若要保留特定的 Office 产品,请向 configuration.xml 文件中添加 IgnoreProduct 行,并指定其产品 ID。To keep a particular Office product, you add an IgnoreProduct line to your configuration.xml file and you specify its product ID.

下面是 Project 和 Visio 支持的 ID 的示例:The following are examples of supported IDs for Project and Visio:

  • PrjStdPrjStd
  • PrjProPrjPro
  • VisStdVisStd
  • VisProVisPro
  • PrjStdRPrjStdR
  • PrjProRPrjProR
  • VisStdRVisStdR
  • VisProRVisProR

备注

产品 ID 是在 Office 旧版本安装文件的 {product}.WW 文件夹内的 Setup.xml 文件中找到的安装程序 ID。The product ID is the Setup ID that is found in the Setup.xml file in the {product}.WW folder of the installation files for your previous version of Office. 例如,可在 ProPlus.WW 文件夹中找到 Office 专业增强版 2010 的 Setup.xml 文件。For example, the Setup.xml file for Office Professional Plus 2010 is found in the ProPlus.WW folder.

该 ID 不是特定于版本的。The ID isn't version specific. 将保留计算机上找到的所有版本。All versions found on the computer will be kept. 例如,如果你指定 VisPro,则将保留 Visio 专业版 2016 和 Visio 专业版 2013。For example, if you specify VisPro, both Visio Professional 2016 and Visio Professional 2013 will be kept. 还会保留这些版本的语言资源。Language resources for those versions are also kept. 例如,语言包、语言界面包或校对工具。For example, language packs, language interface packs, or proofing tools.

只支持完全删除产品。Only full product removals are supported. 举例来说,如果安装了 Office 专业增强版 2013,则无法在不卸载 Excel 的情况下卸载所有内容。For example, if you have Office Professional Plus 2013 installed, you can't uninstall everything except Excel. 必须保留或卸载整个产品。You either must keep or uninstall the entire product. 只有在 Excel 是以独立产品形式安装,而不是作为 Office 套件(比如 Office 专业增强版)的一部分安装的情况下,您才能保留以前安装的 Excel。You can only keep a previous installation of Excel if it was installed as a standalone product, not installed as part of an Office suite, like Office Professional Plus.

下面是一个 configuration.xml 文件的示例,它通过 internet 上的 Office 内容交付网络 (CDN) 安装 Microsoft 365 应用的64位企业版通道版本,并卸载任何 Windows Installer (MSI) 版本的 Office,除了 Visio Professional 之外,在计算机上。Here’s an example of a configuration.xml file that installs the 64-bit Monthly Enterprise Channel version of Microsoft 365 Apps for enterprise in English from the Office Content Delivery Network (CDN) on the internet and uninstalls any Windows Installer (MSI) versions of Office, except for Visio Professional, on the computer.

<Configuration>
  <Add OfficeClientEdition="64" Channel="MonthlyEnterprise">
      <Product ID="O365ProPlusRetail ">
         <Language ID="en-us" />
      </Product>
  </Add>
  <RemoveMSI>
    <IgnoreProduct ID="VisPro" />
  </RemoveMSI>
</Configuration>

可删除的其他产品Other products that can be removed

除非使用 IgnoreProduct,否则还将使用 RemoveMSI 元素删除以下产品的安装:Installations of the following products will also be removed by using the RemoveMSI element unless you use IgnoreProduct:

  • SharePoint Designer。SharePoint Designer. 产品 ID 为 SharePointDesigner。The product ID is SharePointDesigner.
  • InfoPath。InfoPath. 产品 ID 为 InfoPath (适用于批量许可版本)或 InfoPathR (适用于零售版本)。The product ID is either InfoPath (for volume licensed versions) or InfoPathR (for retail versions).
  • Lync 2013 或更高版本。Lync 2013 or later. 请注意,无法使用 RemoveMSI 元素删除 Lync 2010。Note that Lync 2010 can't be removed by using the RemoveMSI element.
  • 单独安装(而不是作为 Office 套件一部分安装)的 Office 产品。Office products that were installed separately and not as part of an Office suite. 例如,独立安装的 Access。For example, a standalone installation of Access.
  • Access 2010 运行时或更高版本。Access 2010 Runtime or later. 产品 ID 为 AccessRT。The product ID is AccessRT.
  • Access 数据库引擎2010可再发行组件或更高版本。Access Database Engine 2010 Redistributable or later. 产品 ID 为 AceRedist。The product ID is AceRedist.

备注

Access 数据库引擎通常包含在与 Access 数据源交互的其他应用程序中,而卸载 Access 数据库引擎可能会影响这些应用程序的功能。Access Database Engine is most commonly included as part of other applications which are interacting with Access data sources, and uninstalling Access Database Engine could impact functionality of these applications. 在删除 Access 数据库引擎前,请确保删除需要此组件的任何应用程序,或者不再需要这些应用程序。Before removing Access Database Engine, ensure that any applications which require this component are removed or no longer needed.

有关使用 RemoveMSI 的其他信息Additional information about using RemoveMSI

下面是有关在 configuration.xml 文件中使用 RemoveMSI 元素的一些其他详细信息。The following are some additional details about using the RemoveMSI element in your configuration.xml file.

  • 如果要安装以下任何产品,也可以使用这些设置:You can also use these settings if you’re installing any of the following products:
    • Project 计划 3 或 Project 计划 5 随附的 Project 桌面应用的订阅版本。The subscription version of the Project desktop app that comes with Project Plan 3 or Project Plan 5.
    • Visio 计划 2 随附的 Visio 桌面应用的订阅版本。The subscription version of the Visio desktop app that comes with Visio Plan 2.
    • Microsoft 365 商业应用版(以前称为 Office 365 商业版),该 Office 版本随附一些 Microsoft 365 商业计划,例如 Microsoft 365 商业高级版。Microsoft 365 Apps for business (previously named Office 365 Business), which is the version of Office that comes with some Microsoft 365 business plans, such as Microsoft 365 Business Premium.
    • Office 2019 的批量许可版本,例如 Office 专业增强版 2019。A volume licensed version of Office 2019, such as Office Professional Plus 2019.
  • 将保留用户设置、首选项和文档,即使你卸载所有 Office 产品也是如此。User settings, preferences, and documents are retained, even if you’re uninstalling all Office products.
  • 你可以将 RemoveMSI 元素与 MSICondition 属性结合使用。You can use the RemoveMSI element in conjunction with the MSICondition attribute. 该属性允许你根据是否已在设备上安装特定的基于 MSI 的产品来控制 Office 产品的安装。That attribute allows you to control the installation of an Office product based on whether a particular MSI-based product is already installed on the device. 例如,如果设备上已安装 Project Professional,则仅安装 Project Online 桌面客户端。For example, only install Project Online Desktop Client if Project Professional is already installed on the device. 有关详细信息,请参阅 MSICondition 属性For more information, see MSICondition attribute.
  • 在安装 Microsoft 365 应用之前,必须先卸载某些早期版本的 Office、Visio 和 Project。Some previous versions of Office, Visio, and Project must be uninstalled before installing Microsoft 365 Apps. 例如 Office 专业增强版 2016。For example, Office Professional Plus 2016. 如果未事先卸载,Microsoft 365 应用的安装将失败。If they aren’t uninstalled beforehand, the installation of Microsoft 365 Apps will fail. 有关详细信息,请参阅在同一台计算机上安装不同版本的 Office、Visio 和 Project 的支持方案For more information, see Supported scenarios for installing different versions of Office, Visio, and Project on the same computer.
  • 需要重新启动才能完成 Office 的 Windows Installer (MSI) 版本的卸载,但不会强制重新启动。A reboot is required to finish uninstalling the Windows Installer (MSI) versions of Office, but the reboot isn’t enforced. 在 Microsoft 365 应用安装完成后,您可以重新启动。You can reboot after the Microsoft 365 Apps installation is finished.
  • 如果产品在用户设备上处于打开状态,并且 configuration.xml 文件中显示元素的 Level 属性 设置为 "无",则删除产品可能会失败。Removing a product might fail if the product is open on the user's device and the Level attribute for the Display element in your configuration.xml file is set to None. 如果将 Level 属性设置为 "完全",系统将提示用户关闭程序,以便可以继续删除。If you set the Level attribute to Full, the user will be prompted to close the program so the removal can continue. 你可以使用 FORCEAPPSHUTDOWN 属性,但这可能会导致数据丢失。You can use the FORCEAPPSHUTDOWN property, but that could result in data loss.
  • 如果在 Windows 7 SP1 计算机上使用 RemoveMSI,即使删除了以前版本的 Office 及其所有其他快捷方式,用户创建的已固定快捷方式有时可能也会保留。If you're using RemoveMSI on a Windows 7 SP1 computer, pinned shortcuts that the user created might sometimes remain even though the previous version of Office and all of its other shortcuts have been removed. 若要删除已固定的快捷方式,只需单击该快捷方式,系统即会提示您将其删除。To remove the pinned shortcut, simply click on it and you'll be prompted to remove it. 或者,以创建固定快捷方式的用户身份登录,然后运行 Office 部署工具以升级到 Microsoft 365 应用。Or, sign in as the user who created the pinned shortcut, and then run the Office Deployment Tool to upgrade to Microsoft 365 Apps.