大网数据广告活动
安装更新与部署

Preparing an Application for Future Major Upgrades

· 52CE 我爱测

Authors of installation packages should include upgrading information in their .msi files to ensure that their installation package can take advantage of the full upgrading functionality available with the Microsoft Windows Installer.

Authors of installation packages should include upgrading information in their .msi files to ensure that their installation package can take advantage of the full upgrading functionality available with the Microsoft Windows Installer.

Every application, or suite of applications, should be assigned an UpgradeCode Property, ProductVersion Property, and ProductLanguage Property. The UpgradeCode property indicates a family of related applications consisting of different versions and different language versions of the same product. For more information about using the UpgradeCode property, see Using an UpgradeCode.

Preparing an application for future major upgrades

  1. Determine a new package code value for the application. For more information about package codes, see Package Codes. Enter the new package code into the Revision Number Summary Property of the Summary Information Stream.
  2. Determine a new ProductCode property for the application. See Changing the Product Code for more information. Enter ProductCode and its value into the Property table.
  3. Determine the application's version and the ProductVersion property. The ProductVersion should increase with each new version of the application. Note that the installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field. Enter ProductVersion and its value into the Property table.
  4. Determine the language of the package and the ProductLanguage property. The value of this property must be a numeric language identifier (LANGID). Enter ProductLanguage and its value into the Property table. Note that the FindRelatedProducts action uses the language returned by MsiGetProductInfo. For FindRelatedProducts to work correctly, the package author must be sure that the ProductLanguage property is set in the Property table to a language that is also listed in the Template Summary property.
  5. If you are authoring an installation package for the first version of your product, use a new UpgradeCode. If your package is intended for a newer version of an existing product, or is the same version as an existing product in a different language, use the same UpgradeCode as the existing product. No two products with the same ProductVersion and the same ProductLanguage can have the same UpgradeCode, unless one is a small update of the other.
  6. The UpgradeCode has the format of a GUID. Enter the UpgradeCode GUID into the Property table.

For more information, see Preventing an Old Package from Installing Over a Newer Version.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。