这似乎还没有引起问题,但这是我真正想了解的事情。
基本上,我们的产品有四个版本:1.0 (2.6.0.0)、1.0.1 (2.6.1.0)、1.1.1 (2.6.3.0) 和 1.1.2 (2.6.4.0)。我们只是在测试 1.1.2 的完整安装程序和补丁安装程序。
我们看到的奇怪的事情是,当从 1.0 -> 1.1.2 应用补丁时,安装程序的日志显示它首先选择使用 1.0.1 -> 1.1.2 补丁转换,这对我来说很愚蠢因为它可以使用从 1.0 -> 1.1.2 的转换。日志如下:
SequencePatches starts. Product code: {A9206E66-68A6-4A64-8ECA-F96D2635FB33}, Product version: 2.6.0.0, Upgrade code: {58142252-3B0E-44CA-99EC-F9FB3C4D976E}, Product language 1033
MSI (c) (A4:18) [14:11:53:235]: PATCH SEQUENCER: verifying the applicability of minor upgrade patch C:\DOCUME~1\Testuser\LOCALS~1\Temp\{3E3C7709-FF95-48AF-8836-5D62996F0FD4}\[productname]112enu_x86.msp against product code: {A9206E66-68A6-4A64-8ECA-F96D2635FB33}, product version: 2.6.0.0, product language 1033 and upgrade code: {58142252-3B0E-44CA-99EC-F9FB3C4D976E}
MSI (c) (A4:18) [14:11:53:235]: PATCH SEQUENCER: minor upgrade patch C:\DOCUME~1\Testuser\LOCALS~1\Temp\{3E3C7709-FF95-48AF-8836-5D62996F0FD4}\[productname]112enu_x86.msp is applicable.
MSI (c) (A4:18) [14:11:53:245]: SequencePatches returns success.
MSI (c) (A4:18) [14:11:53:245]: Final Patch Application Order:
MSI (c) (A4:18) [14:11:53:245]: {1721243D-5A87-4972-9226-E87EE0B87A08} - C:\DOCUME~1\Testuser\LOCALS~1\Temp\{3E3C7709-FF95-48AF-8836-5D62996F0FD4}\[productname]112enu_x86.msp
MSI (c) (A4:18) [14:11:53:245]: {1721243D-5A87-4972-9226-E87EE0B87A08} - C:\DOCUME~1\Testuser\LOCALS~1\Temp\{3E3C7709-FF95-48AF-8836-5D62996F0FD4}\[productname]112enu_x86.msp
MSI (c) (A4:18) [14:11:53:245]: Machine policy value 'DisablePatch' is 0
MSI (c) (A4:18) [14:11:53:245]: Machine policy value 'AllowLockdownPatch' is 0
MSI (c) (A4:18) [14:11:53:245]: Machine policy value 'DisableLUAPatching' is 0
MSI (c) (A4:18) [14:11:53:245]: Machine policy value 'DisableFlyWeightPatching' is 0
MSI (c) (A4:18) [14:11:53:245]: Turning off patch optimization. {1721243D-5A87-4972-9226-E87EE0B87A08} patch is not authored to support it.
MSI (c) (A4:18) [14:11:53:245]: Looking for patch transform: 101enuTo112enu
... More stuff ...
MSI (c) (A4:18) [14:11:53:265]: Disallowing uninstallation of patch {1721243D-5A87-4972-9226-E87EE0B87A08} because it adds new entries to table CreateFolder
MSI (c) (A4:18) [14:11:53:265]: Note: 1: 2205 2: 3: PatchPackage
MSI (c) (A4:18) [14:11:53:265]: TRANSFORM: 'PatchPackage' table is missing or empty. No pre-transform fixup necessary.
MSI (c) (A4:18) [14:11:53:265]: TRANSFORM: Applying regular transform to database.
... More stuff ...
MSI (c) (A4:18) [14:11:53:265]: Looking for patch transform: 10enuTo112enu
DEBUG: Error 2748: Transform 10enuTo112enu invalid for package C:\WINDOWS\Installer\882d.msi. Expected product version <= 2.6.0.0, found product version 2.6.4.0.
1: 2748 2: 10enuTo112enu 3: C:\WINDOWS\Installer\882d.msi 4: 2.6.0.0 5: 2.6.4.0
MSI (c) (A4:18) [14:11:53:265]: Skipping validation for patch transform #10enuTo112enu. Will not apply because previous transform was invalid
MSI (c) (A4:18) [14:11:53:265]: Looking for patch transform: 111enuTo112enu
DEBUG: Error 2748: Transform 111enuTo112enu invalid for package C:\WINDOWS\Installer\882d.msi. Expected product version <= 2.6.3.0, found product version 2.6.4.0.
1: 2748 2: 111enuTo112enu 3: C:\WINDOWS\Installer\882d.msi 4: 2.6.3.0 5: 2.6.4.0
MSI (c) (A4:18) [14:11:53:265]: Skipping validation for patch transform #111enuTo112enu. Will not apply because previous transform was invalid
那么为什么它选择先应用错误的变换呢?我猜它无论如何都会应用它,因为当它进行正确的转换时,它知道产品版本已更新到 2.6.4.0。
我注意到在之前的 setups 文件夹下的补丁设计器中,顺序确实是 1.0.1、1.0、1.1.1。这肯定不是确定 Windows Installer 运行补丁转换的顺序吗?!
如果有人知道这种行为,或者可以指出我正确的方向,我将非常感激!:)
谢谢!
更新
我认为这已经成为一个问题!:( 我认为当文件表更新时,转换的错误顺序会导致问题。因为它认为它是从 1.0.1 -> 1.1.2 转换的,所以它假设文件表中有一行,只需要修改,当我们真的从 1.0 -> 1.1.2 转换并且该行不存在于表中并且需要添加时!
有人有什么想法吗?