创建补丁属性文件
若要重现示例修补程序包,需要一个能够创建和编辑 Windows Installer 修补程序包的软件工具。 独立软件供应商提供了多个修补程序包创建工具。 以下部分中讨论的示例使用名为 Orca 的 Windows Installer 数据库编辑器创作修补程序创建属性文件(.pcp 扩展)。 .pcp 文件可与实用工具 Msimsp.exe 和 Patchwiz.dll 一起使用,以生成 Windows Installer 修补程序包(.msp 扩展名)。 Orca、Msimsp.exe和 Patchwiz.dll 在适用于 Windows Installer 开发人员 的Windows SDK 组件中提供。
SDK 还提供了一个名为 template.pcp 的空白补丁创建属性文件。 创建 template.pcp 的副本,并将此副本重命名为 MNP2000.pcp。 使用 Orca 或其他数据库编辑器将以下数据输入到 MNP2000.pcp 的 Properties 表中。 Properties 表包含修补程序包的全局设置。
名字 | 价值 |
---|---|
AllowProductCodeMismatches | 1 |
AllowProductVersionMajorMismatches | 1 |
ApiPatchingSymbolFlags | 0x00000000 |
DontRemoveTempFolderWhenFinished | 1 |
IncludeWholeFilesOnly | 0 |
ListOfPatchGUIDsToReplace | |
目标产品代码列表 | * |
PatchGUID | {5406B219-A1AC-4BC4-8695-72292C8195AC} |
PatchOutputPath | c:\output.msp |
PatchSourceList | PatchSourceList |
使用数据库编辑器将以下数据输入到 MNP2000.pcp 的 ImageFamilies 表中。 ImageFamilies 表包含在修补过程中要添加到媒体表中的信息。
家庭 | MediaSrcPropName | MediaDiskId | FileSequenceStart | DiskPrompt | VolumeLabel |
---|---|---|---|---|---|
MNPapps | MNPSrcPropName | 2 | 1000 |
在 MNP2000.pcp 的 UpgradedImages 表中输入以下数据。 UpgradedImages 表包含您在计划小更新补丁中创建的升级映像的信息。
已升级 | MsiPath | PatchMsiPath | SymbolPaths | 家庭 |
---|---|---|---|---|
MNP_fixed | C:\Note_Installer\Patch\Upgraded\MNP2000.msi | MNPapps |
在 MNP2000.pcp 的 TargetImages 表中输入以下数据。 TargetImages 表包含有关目标映像的信息。
目标 | MsiPath | SymbolPaths | 已升级 | Order | ProductValidateFlags | IgnoreMissingSrcFiles |
---|---|---|---|---|---|---|
MNP_error | C:\Note_Installer\Patch\Target\MNP2000.msi | MNP_fixed | 1 | 0 |
对于示例修补程序包,请保持 MNP2000.pcp 文件中的下表空白。