Windows Installer 不安装功能并且不报告错误.(请求:空) [英] Windows Installer does not install feature and does not report an error. (Request: Null)

查看:29
本文介绍了Windows Installer 不安装功能并且不报告错误.(请求:空)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 WiX 创建的简单 msi.尝试安装产品.在某些计算机上它会失败,没有错误,并且安装程序日志将包含以下行:

A simple msi created using WiX. Trying to install a product. On some computers it will fail, without an error, and the installer log will contain these rows:

PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is '{7C9...0A0}'
PROPERTY CHANGE: Adding MIGRATE property. Its value is '{7C9...0A0}'
Product Code from property table after transforms:  '{68F...FAE}'
Product not registered: beginning first-time install
Doing action: INSTALL 
Doing action: InstallValidate 
Feature: ProductFeature; Installed: Absent;   Request: Null;   Action: Null 
MIGRATE = {7C9...0A0};{A9B...BCE}
Installation completed successfully.

不知何故,Windows Installer 决定无事可做(请求:空),即使它承认这是第一次安装.那台计算机安装了该产品的先前版本.如何强制安装程序安装?

Somehow, Windows Installer decides that there is nothing to do (Request: Null), even though it acknowledges that this is the first time install. That computer had previous version of the product installed. How do I force the installer to install?

这是相关的 WiX 代码:

Here is the relevant WiX code:

<Product Id="*"
           Name="..."
           Language="1033"
           Version="..."
           Manufacturer="..."
           UpgradeCode="8D8...196"> 

<Package Id="*"
             InstallerVersion="200"
             Compressed="yes"
             InstallScope="perMachine"
             InstallPrivileges="elevated"
             Platform="$(var.Platform)" />

<Property Id="REINSTALLMODE" Value="amus" />

<MajorUpgrade AllowDowngrades="yes" IgnoreRemoveFailure="yes" AllowSameVersionUpgrades="no"/>

<Feature Id="ProductFeature" Title="..." Level="1" Absent="disallow" AllowAdvertise="no" InstallDefault="local" TypicalDefault="install">
      <Condition Level="1">True</Condition>

完整的安装程序日志:https://www.dropbox.com/s/abnryavh203a82w/acme_installer_log.txt?dl=0

推荐答案

评论太长了,添加为答案.只是一些事情:

This got too long for a comment, adding as an answer. Just a couple of things:

  1. 你绝对不应该为任何 MSI 包设置 REINSTALLMODE="amus".

  • 如果您在此设置中包含合并模块,您可以降级共享文件 - 即使您不自己写入共享位置.
  • 最好的是默认的 "omus",但我想 "emus" 也可以(如果文件丢失,或者是一个相同或更旧的版本).
  • If you include merge modules in this setup you could downgrade shared files - even if you otherwise don't write to shared locations yourself.
  • The best would be the default "omus", but I guess "emus" is also ok (Reinstall if the file is missing, or is an equal or older version).

看起来 MigrateFeatureStates 操作 至少与所看到的问题有关:

It certainly looks like the MigrateFeatureStates action is at least related to the problem seen:

  • MigrateFeatureStates:基于现有产品,将功能ProductFeature"设置为Absent"状态.

您的 INSTALLLEVEL 属性 看起来不错.

您可能想要打开已编译的 MSI 并验证条件表(可以更改功能选择状态)中是否没有条目.那里应该什么都没有,但也许只是验证一下.

You might want to open the compiled MSI and verify that there are no entries in the Condition table (which can change feature selection states). There should be nothing there, but perhaps just verify.

我想您可以尝试将 WiX Feature 元素Absent 属性 设置为 "disallow",重新编译并查看如果这改变了事情.如果这是您唯一的功能,除了使用 Phils 建议将 MigrateFeatureStates 设置为No" 之外,我还会进行此更改.为什么要删除您唯一的功能?

I suppose you could try to set the Absent attribute for the WiX Feature element to "disallow", recompile and see if this changes things. If this is your only feature I would make this change in addition to using Phils suggestion to set MigrateFeatureStates to "No". Why allow your only feature to be removed?

这个问题是如何发生的,有点奇怪.也许您在 MSI 上运行了修改,然后只是选择了要在机器上的旧安装中卸载的功能?听起来不太可能 - 特别是如果它是您唯一的功能.

It is a little odd how this problem has occurred. Perhaps you ran modify on your MSI and simply selected the feature to be uninstalled in the old installation on the machine? Sounds unlikely - especially if it is your only feature.

  • 您是否在相关机器上安装了多个早期版本的产品,还是只有一个早期版本?

  • Did you install several earlier versions of your product on the machine in question, or was there only one prior version?

再一次,编译后的 MSI 的条件表"中是否有条目?(使用 Orca 检查).

Again, are there entries in the "Condition table" in the compiled MSI? (Check using Orca).

您是否更改了最新软件包中的功能名称?

Did you change the feature name in your newest package?

无论如何,您应该能够通过1)修复"损坏的安装,只需运行您现有的设置并将 ADDLOCAL=ALL 添加到您的 msiexec.exe 安装命令中 - 我认为这将覆盖MigrateFeatureStates 操作(不是真正的修复,只是一种解决方法).或者 2) 你可以禁用 MigrateFeatureStates 并重新编译设置 - 这应该可以永久解决问题,并且 3) 如果我是你,我会设置 Absent 属性WiX Feature 元素 设置为 "disallow" 以便您的(仅?)功能无法被删除.

In any event you should be able to "fix" the broken install by 1) simply running your existing setup and adding ADDLOCAL=ALL to your msiexec.exe install command - I think that will override the MigrateFeatureStates action (not a real fix, just a workaround). Or 2) you can disable MigrateFeatureStates and recompile the setup - that should fix things permanently, and 3) if I were you I would set the Absent attribute for the WiX Feature element to "disallow" so that your (only?) feature can't be removed.

Phil,如果你看到这个,你知道日志中看到的MIGRATE属性是关于什么的吗?它看起来像一些 WiX 特定的东西 - 除非它来自这个 MSI 的升级表:

Phil, if you see this, do you know what the MIGRATE property seen in the log is about? It looks like some WiX specific stuff - unless it is something from this MSI's upgrade table:

MSI (c) (04:24) [13:01:38:751]: Doing action: FindRelatedProducts
MSI (c) (04:24) [13:01:38:751]: Note: 1: 2205 2:  3: ActionText 
Action 13:01:38: FindRelatedProducts. Searching for related applications Found application: [1]
Action start 13:01:38: FindRelatedProducts.
FindRelatedProducts: 
MSI (c) (04:24) [13:01:38:751]: PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0}'.
MSI (c) (04:24) [13:01:38:751]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0}'.
FindRelatedProducts: 
MSI (c) (04:24) [13:01:38:752]: PROPERTY CHANGE: Modifying WIX_UPGRADE_DETECTED property. Its current value is '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0}'. Its new value: '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0};{A9B1787A-32E4-4D51-819D-B3F879574BCE}'.
MSI (c) (04:24) [13:01:38:752]: PROPERTY CHANGE: Modifying MIGRATE property. Its current value is '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0}'. Its new value: '{7C945F97-A2CC-4EEB-87AC-3D23D6C490A0};{A9B1787A-32E4-4D51-819D-B3F879574BCE}'.
Action ended 13:01:38: FindRelatedProducts. Return value 1.

tandrasz:据我所知 FindRelatedProducts 找到的两个 GUID ({7C945F97-A2CC-4EEB-87AC-3D23D6C490A0};{A9B1787A-32E4-4D51-819-B3F879574BCE}),与您的新设置的产品代码({68F5E655-2E2D-492E-B445-BE1650AF5FAE})不同.这使得 FindRelatedProducts 在相关机器上发现了两个相关产品".是否安装了同一个 MSI 的两个旧版本,或者您是否拥有共享相同升级代码的套件"MSI 文件?.如果您安装了两个不相关"的软件包,也许 MigrateFeatureStates 无法在这两个软件包和您正在安装的新软件包之间迁移功能状态?

tandrasz: as far as I can see the two GUIDs that are found by FindRelatedProducts ({7C945F97-A2CC-4EEB-87AC-3D23D6C490A0};{A9B1787A-32E4-4D51-819D-B3F879574BCE}), are different from your new setup's product code ({68F5E655-2E2D-492E-B445-BE1650AF5FAE}). This makes it look like there are two "related products" found by FindRelatedProducts on the machine in question. Are two older versions of the same MSI installed, or do you have a "suite" of MSI files that all share the same upgrade code?. If you have two "unrelated" packages installed, perhaps MigrateFeatureStates finds no way to migrate the feature states between those two and the new package you are installing?

这篇关于Windows Installer 不安装功能并且不报告错误.(请求:空)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆