默认情况下在WIX中启用功能

时间:2011-09-22 13:58:56

标签: installer wix wix3.5

在扩展我必须维护的WIX安装程序时,我遇到了以下问题 - 当显示功能和组件树product feature is not selected by default时。

我尝试了不同的变体,包括添加InstallDefault ='local'TypicalDefault ='install'Absent = 'disallow',但该功能仍处于禁用状态。

以下是描述该功能的代码:

<Feature    Id="Complete" Level="1"
  Display='expand'
  InstallDefault ='local'
  TypicalDefault ='install'
  Absent = 'disallow'
  Title="$(var.ProductName)">
  <ComponentGroupRef Id="Required_files"/>
  <?ifdef InstallDriver?>
    <ComponentGroupRef Id='driver_files'/>
  <?endif?>
  <ComponentRef Id="ProgramMenuShortcuts"/>
  <ComponentRef Id="ProductInfo"/>
  <?ifdef RemoveAllRegKeys?>
    <ComponentRef Id="RegRemoveAll"/>
  <?endif?>
  <ComponentGroupRef Id="FBmodule"/>
</Feature>

检查了日志后,我看到一些似乎与此相关的条目(当我手动将功能设置为&#34;安装到本地硬盘&#34;时会发生这种情况。)

MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedFeature property. Its value is 'Complete'.
MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedAction property. Its value is '2'.
MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedCost property. Its value is '0'.
Action 16:43:57: FeaturesDlg. Dialog created
MSI (c) (FC:90) [16:51:44:645]: Note: 1: 2727 2:  
 .... many repetitions of Note: 1: 2727 2:  
MSI (c) (FC:90) [16:51:45:146]: Note: 1: 2727 2:  
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2205 2:  3: MsiAssembly 
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2228 2:  3: MsiAssembly 4:  SELECT `MsiAssembly`.`Attributes`, `MsiAssembly`.`File_Application`, `MsiAssembly`.`File_Manifest`,  `Component`.`KeyPath` FROM `MsiAssembly`, `Component` WHERE  `MsiAssembly`.`Component_` = `Component`.`Component` AND `MsiAssembly`.`Component_` = ? 
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2205 2:  3: _RemoveFilePath 
MSI (c) (FC:90) [16:51:45:639]: Note: 1: 2727 2:  
MSI (c) (FC:90) [16:51:45:647]: PROPERTY CHANGE: Modifying MsiSelectionTreeSelectedAction property. Its current value is '2'. Its new value: '3'.
MSI (c) (FC:90) [16:51:45:647]: PROPERTY CHANGE: Modifying MsiSelectionTreeSelectedCost property. Its current value is '0'. Its new value: '7318'.

我怀疑这可能与安装程序中存在自定义对话框这一事实有关 - 但是查看了源代码后我找不到任何可能表明功能状态与其他内容之间存在关系的内容。项目

建议的故障排除步骤是什么?

这是full installation log

1 个答案:

答案 0 :(得分:0)

我找到了罪魁祸首。安装程序本身很好,问题在于它是如何启动的。

我有一个BAT文件用于测试目的,它使用一些模拟不同条件的命令行参数运行MSI。

命令行参数 REINSTALL = ALL REINSTALLMODE = vomus 必须仅在安装程序更新程序时应用;当在干净的系统上以这种方式启动时 - 进度条移动并且一切都按预期进行,但实际上没有安装。

换句话说,错误在于测试方法。

相关问题