若要重現範例修補程式套件,您需要能夠建立和編輯 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 數據表包含修補程式套件的全域設定。
| 名字 | 價值 |
|---|---|
| 允許產品代碼不匹配 | 1 |
| 允許產品版本主要不匹配 | 1 |
| ApiPatchingSymbolFlags | 0x00000000 |
| 完成時勿刪除暫存資料夾 | 1 |
| IncludeWholeFilesOnly | 0 |
| ListOfPatchGUIDsToReplace | |
| 目標產品代碼列表 | * |
| PatchGUID | {5406B219-A1AC-4BC4-8695-72292C8195AC} |
| PatchOutputPath | c:\output.msp |
| 補丁來源列表 | 修補來源清單 |
使用資料庫編輯器,在 MNP2000.pcp 的 ImageFamilies 數據表中輸入下列數據。 ImageFamilies 資料表包含在修補過程中要新增至 Media 資料表 的資訊。
| 家庭 | MediaSrcPropName | MediaDiskId | 文件序列開始 | 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 | 符號路徑 | 升級 | 次序 | 產品驗證標誌 | IgnoreMissingSrcFiles |
|---|---|---|---|---|---|---|
| MNP錯誤 | C:\Note_Installer\Patch\Target\MNP2000.msi | MNP_fixed | 1 | 0 |
針對這個範例修補套件,請將 MNP2000.pcp 中以下幾個表格保留空白。
UpgradedFiles_OptionalData 數據表