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

Creating a Patch Package

· 52CE 我爱测

Developers create a patch package by generating a patch creation file and using Msimsp.exe to call the UiCreatePatchPackageEx function in Patchwiz.dll.

Developers create a patch package by generating a patch creation file and using Msimsp.exe to call the UiCreatePatchPackageEx function in Patchwiz.dll. Msimsp.exe and Patchwiz.dll are provided in the Windows Installer SDK. For more information, see A Small Update Patching Example.

Because the application of a patch to a Windows Installer package results in the installation of the original sources using a new .msi file, the new .msi file must remain compatible with the layout of the original source.

When you author a patch package you must use an uncompressed setup image to create a patch, for example, an administrative image or an uncompressed setup image from a CD-ROM. You must also adhere to the following restrictions:

  • Do not move files from one folder to another.

  • Do not move files from one cabinet to another.

  • Do not change the order of files in a cabinet.

  • Do not change the sequence number of existing files. The sequence number is the value specified in the Sequence column of the File Table.

  • Any new files that are added by the patch must be placed at the end of the existing file sequence. The sequence number of any new file in the upgraded image must be greater than the largest sequence number of existing files in the target image.

  • Do not change the primary keys in the File Table between the original and new .msi file versions.

    [!Note]
    The file must have the same key in the File Table of both the target image and the updated image. The string values in the File column of both tables must be identical, including the case.

  • Do not author a package with File Table keys that differ only in case, for example, avoid the following table example.

    File Component_ FileName
    readme.txt Comp1 readme.txt
    ReadMe.txt Comp2 readme.txt

    The Windows Installer can allow the previous table example when Comp1 and Comp2 are installed on different directories, but then you cannot use Msimsp.exe or Patchwiz.dll to generate a patch for the package. Msimsp.exe and Patchwiz.dll call Makecab.exe, which is case-insensitive and fails.

    When using merge modules in the setup, ensure that file sequence numbers and layout adhere to the above guidelines.

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)

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

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