递归 MSI 链接
Recursive MSI Chaining
我正在使用 InstallShield 2015 编写 Basic MSI 类型的安装程序。我有服务器安装、工作站安装和第三方 (Microsoft) 安装程序,用于支持通过 COM 互操作访问 .NET Forms (Microsoft.InteropformsRedist.msi)。工作站需要安装Microsoft.InteropformsRedist.msi。服务器需要安装工作站。这些配对单独工作,但当服务器尝试安装工作站时,工作站又想安装 InteropformsRedist,似乎 InteropformsRedist 没有安装。我在 MSI 日志中看到它的提及,但没有明确的迹象表明它实际上没有安装。我刚刚在安装后遇到了手动解决的错误 运行 InteropformRedist.msi.
日志中第一次提到 InteropformsRedist 如下所示:
InstallShield 12:11:11: Extracting temp files for chained package Pkg1 to 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding IS_CHAINER_POST_COMMANDLINE property. Its value is '/l"C:\Users\bmarty\AppData\Local\Temp\MSI7fa2d.LOG" /qb /iC:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}\Microsoft.InteropformsRedist.msi'.
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding ISChainPackageCommit property. Its value is 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'.
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding ISChainPackageRollback property. Its value is 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'.
InstallShield 12:11:11: Extracting file 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}\Microsoft.InteropformsRedist.msi' for chained package Pkg1
MSI (s) (70:EC) [12:11:24:672]: Doing action: InstallInitialize
Action ended 12:11:24: ISChainPackagePrepare. Return value 1.
MSI (s) (70:EC) [12:11:24:673]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (70:EC) [12:11:24:673]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (70:EC) [12:11:24:673]: BeginTransaction: Locking Server
MSI (s) (70:EC) [12:11:24:674]: Server not locked: locking for product {11FD6005-8100-4B5C-85E6-C26BAD6C8696}
Action start 12:11:24: InstallInitialize.
MSI (s) (70:EC) [12:11:26:245]: Doing action: ISChainPackageRollback
Action ended 12:11:26: InstallInitialize. Return value 1.
MSI (s) (70:EC) [12:11:26:246]: Note: 1: 2205 2: 3: MsiPatchCertificate
MSI (s) (70:EC) [12:11:26:246]: LUA patching is disabled: missing MsiPatchCertificate table
Action start 12:11:26: ISChainPackageRollback.
MSI (s) (70:EC) [12:11:26:249]: Doing action: ISChainPackageCommit
Action ended 12:11:26: ISChainPackageRollback. Return value 1.
Action start 12:11:26: ISChainPackageCommit.
MSI (s) (70:EC) [12:11:26:250]: Doing action: AllocateRegistrySpace
Action ended 12:11:26: ISChainPackageCommit. Return value 1.
Action start 12:11:26: AllocateRegistrySpace.
MSI (s) (70:EC) [12:11:26:251]: Doing action: ProcessComponents
Action ended 12:11:26: AllocateRegistrySpace. Return value 1.
Action start 12:11:26: ProcessComponents.
MSI (s) (70:EC) [12:11:26:253]: Doing action: UnpublishComponents
Action ended 12:11:26: ProcessComponents. Return value 1.
里面有没有说明为什么它没有真正安装?有什么技巧可以让这项工作成功吗?
如果您正在使用发布视图的 "Chained MSI Packages" 区域,则您正在通过 MsiEmbeddedChainer table. I haven't ever found clear documentation on its limits, but it has several. The relevant one you are seeing is that it will not launch an embedded chainer from within another chainer. Perhaps this is because if the outer chainer has subsequent packages, it doesn't know to reclaim ownership of the transaction, and cannot do so before the inner chainer releases (or commits) the transaction; this would cause a rollback per the commentary on phChangeOfOwnerEvent of MsiJoinTransaction.
使用嵌入式链接
我们从经验中了解到,外部或 bootstrap 链接器的奇怪行为较少,因此我会推荐它们而不是嵌入式链接器。如果您想通过 InstallShield 执行此操作,则需要 Premier 版的 Suite/Advanced UI 项目类型。 (如果除了一个包之外的所有包都可以被视为依赖项,并且您从 prq 文件导入它们,并且它们将符合专业版中 Advanced UI 项目的限制。)
我正在使用 InstallShield 2015 编写 Basic MSI 类型的安装程序。我有服务器安装、工作站安装和第三方 (Microsoft) 安装程序,用于支持通过 COM 互操作访问 .NET Forms (Microsoft.InteropformsRedist.msi)。工作站需要安装Microsoft.InteropformsRedist.msi。服务器需要安装工作站。这些配对单独工作,但当服务器尝试安装工作站时,工作站又想安装 InteropformsRedist,似乎 InteropformsRedist 没有安装。我在 MSI 日志中看到它的提及,但没有明确的迹象表明它实际上没有安装。我刚刚在安装后遇到了手动解决的错误 运行 InteropformRedist.msi.
日志中第一次提到 InteropformsRedist 如下所示:
InstallShield 12:11:11: Extracting temp files for chained package Pkg1 to 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding IS_CHAINER_POST_COMMANDLINE property. Its value is '/l"C:\Users\bmarty\AppData\Local\Temp\MSI7fa2d.LOG" /qb /iC:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}\Microsoft.InteropformsRedist.msi'.
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding ISChainPackageCommit property. Its value is 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'.
MSI (s) (70!C0) [12:11:24:671]: PROPERTY CHANGE: Adding ISChainPackageRollback property. Its value is 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}'.
InstallShield 12:11:11: Extracting file 'C:\Users\bmarty\AppData\Local\Temp\{88EF0570-B960-4DD7-BF2F-F942CE0C9EEE}\Microsoft.InteropformsRedist.msi' for chained package Pkg1
MSI (s) (70:EC) [12:11:24:672]: Doing action: InstallInitialize
Action ended 12:11:24: ISChainPackagePrepare. Return value 1.
MSI (s) (70:EC) [12:11:24:673]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (70:EC) [12:11:24:673]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (70:EC) [12:11:24:673]: BeginTransaction: Locking Server
MSI (s) (70:EC) [12:11:24:674]: Server not locked: locking for product {11FD6005-8100-4B5C-85E6-C26BAD6C8696}
Action start 12:11:24: InstallInitialize.
MSI (s) (70:EC) [12:11:26:245]: Doing action: ISChainPackageRollback
Action ended 12:11:26: InstallInitialize. Return value 1.
MSI (s) (70:EC) [12:11:26:246]: Note: 1: 2205 2: 3: MsiPatchCertificate
MSI (s) (70:EC) [12:11:26:246]: LUA patching is disabled: missing MsiPatchCertificate table
Action start 12:11:26: ISChainPackageRollback.
MSI (s) (70:EC) [12:11:26:249]: Doing action: ISChainPackageCommit
Action ended 12:11:26: ISChainPackageRollback. Return value 1.
Action start 12:11:26: ISChainPackageCommit.
MSI (s) (70:EC) [12:11:26:250]: Doing action: AllocateRegistrySpace
Action ended 12:11:26: ISChainPackageCommit. Return value 1.
Action start 12:11:26: AllocateRegistrySpace.
MSI (s) (70:EC) [12:11:26:251]: Doing action: ProcessComponents
Action ended 12:11:26: AllocateRegistrySpace. Return value 1.
Action start 12:11:26: ProcessComponents.
MSI (s) (70:EC) [12:11:26:253]: Doing action: UnpublishComponents
Action ended 12:11:26: ProcessComponents. Return value 1.
里面有没有说明为什么它没有真正安装?有什么技巧可以让这项工作成功吗?
如果您正在使用发布视图的 "Chained MSI Packages" 区域,则您正在通过 MsiEmbeddedChainer table. I haven't ever found clear documentation on its limits, but it has several. The relevant one you are seeing is that it will not launch an embedded chainer from within another chainer. Perhaps this is because if the outer chainer has subsequent packages, it doesn't know to reclaim ownership of the transaction, and cannot do so before the inner chainer releases (or commits) the transaction; this would cause a rollback per the commentary on phChangeOfOwnerEvent of MsiJoinTransaction.
使用嵌入式链接我们从经验中了解到,外部或 bootstrap 链接器的奇怪行为较少,因此我会推荐它们而不是嵌入式链接器。如果您想通过 InstallShield 执行此操作,则需要 Premier 版的 Suite/Advanced UI 项目类型。 (如果除了一个包之外的所有包都可以被视为依赖项,并且您从 prq 文件导入它们,并且它们将符合专业版中 Advanced UI 项目的限制。)