Wix 32位和64位MSI没有互相卸载

时间:2015-01-08 21:55:36

标签: .net wix x86 64-bit 32bit-64bit

我们目前发布了一个32位.NET应用程序。我们的下一个版本有一个64位和32位MSI,使用相同的WIX项目文件,使用SO上的标准技巧。

如果我将v1(32位)升级到v2(64位),Wix将卸载旧版本(从Program Files(x86))并将v2放入Program Files。正是我想要的。

如果我然后尝试安装32位版本的v2,它将在64位版本的v2旁边安装32位版本,并且它们都存在于各自的Program Files and Program Files(x86)文件夹中

如果我再为v2重新运行64位MSI,它将正确卸载32位版本并仅安装64位版本。

我的产品代码是动态生成的,两个MSI都具有相同的UpgradeCode

<Product Id="*" Name="Awesome Product" Language="1033" Version="$(var.Version)" 
         Manufacturer="Company, Inc." UpgradeCode="C7F99857-9999-4D36-AAA2-34B1D364BE19">

日志文件看起来并没有那么不同,但我在64到32位版本中看到了这个版本,这是一个不能按预期工作并且不卸载64位软件的版本:

  

PROPERTY CHANGE:修改ProgramFiles64Folder属性。它的当前值是'C:\ Program Files \'。它的新值:'c:\ Program Files(x86)\'。

这发生在消息之后的某个时间:

  

执行操作:RemoveExistingProducts

所以我想知道它是否以某种方式更新了它将用于卸载软件包的路径,因此实际上并没有删除任何东西?

我觉得我已经搜索并阅读了所有相关的网页,博客文章和邮件列表信息,但我对任何建议和参考资料持开放态度。

编辑:我在日志中检查了FindRelatedProducts的32-> 64位升级。在那个文件中我看到:

Action start 14:53:55: INSTALL.
MSI (c) (24:B4) [14:53:55:392]: UI Sequence table 'InstallUISequence' is present and populated.
MSI (c) (24:B4) [14:53:55:392]: Running UISequence
MSI (c) (24:B4) [14:53:55:392]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'.
MSI (c) (24:B4) [14:53:55:392]: Doing action: FindRelatedProducts
MSI (c) (24:B4) [14:53:55:392]: Note: 1: 2205 2:  3: ActionText 
Action 14:53:55: FindRelatedProducts. Searching for related applications
Action start 14:53:55: FindRelatedProducts.
FindRelatedProducts: Found application: {85A5CC9D-3C1C-403D-B539-CA95B77B49ED}
MSI (c) (24:B4) [14:53:55:392]: PROPERTY CHANGE: Adding OLDPRODUCTFOUND property. Its value is '{85A5CC9D-3C1C-403D-B539-CA95B77B49ED}'.
Action ended 14:53:55: FindRelatedProducts. Return value 1.

然后当我在64位版本之上安装32位版本时:

Action 15:02:37: INSTALL. 
Action start 15:02:37: INSTALL.
MSI (c) (EC:7C) [15:02:37:421]: UI Sequence table 'InstallUISequence' is present and populated.
MSI (c) (EC:7C) [15:02:37:421]: Running UISequence
MSI (c) (EC:7C) [15:02:37:421]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'.
MSI (c) (EC:7C) [15:02:37:421]: Doing action: FindRelatedProducts
MSI (c) (EC:7C) [15:02:37:421]: Note: 1: 2205 2:  3: ActionText 
Action 15:02:37: FindRelatedProducts. Searching for related applications
Action start 15:02:37: FindRelatedProducts.
FindRelatedProducts: Found application: {3AF0BDBB-6F3B-4A2C-B8EC-42FB970A7C44}
MSI (c) (EC:7C) [15:02:37:422]: PROPERTY CHANGE: Adding OLDPRODUCTFOUND property. Its value is '{3AF0BDBB-6F3B-4A2C-B8EC-42FB970A7C44}'.
Action ended 15:02:37: FindRelatedProducts. Return value 1.

1 个答案:

答案 0 :(得分:0)

FindRelatedProducts may find something, but that doesn't mean that it will do the upgrade. The rest of the log would show this, but if you have OnlyDetect set Yes in an upgrade element in your x86 setup then it won't upgrade, just an example of what might be wrong. Or you don't have a RemoveExistingProducts action or it's conditioned or something.

It's also possible, though perhaps unlikely, that your RemoveExistingProducts is after InstallFinalize (or otherwise outside the transaction) then if the x64 uninstall fails (for example after InstallFinalize) then it will roll back and leave both products installed.