默认情况下在WIX中启用功能(Enable feature by default in WIX)

编程入门 行业动态 更新时间:2024-10-12 22:25:25
默认情况下在WIX中启用功能(Enable feature by default in WIX)

在扩展我必须维护的WIX安装程序时,我遇到了以下问题 - 当显示功能和组件树时,默认情况下未选择产品功能 。

我尝试了不同的变体,包括添加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>

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

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'.

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

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

这是完整的安装日志 。

While extending a WIX-installer that I have to maintain, I ran into the following problem - when shown the tree of features and components, the product feature is not selected by default.

I tried different variations, including adding InstallDefault ='local', TypicalDefault ='install', and Absent = 'disallow', however, the feature is still disabled.

Here is the code that describes the feature:

<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>

Having examined the logs, I see some entries that seem to be related to this (this is happening when I manually set the feature to "install to local hard disk").

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'.

I suspect that this could be related to the fact that there is a custom dialog in the installer - but having looked through the source I could not find anything that would indicate a relationship between the state of the feature and something else in the project.

What are the recommended troubleshooting steps?

Here is the full installation log.

最满意答案

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

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

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

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

I found the culprit. The installer itself is fine, the problem is in how it is started.

There is a BAT file that I use for testing purposes, it runs the MSI with some command line arguments that simulate different conditions.

The command line arguments REINSTALL=ALL REINSTALLMODE=vomus must only be applied when the installer updates the program; when started that way on a clean system - the progress bar moves and everything goes as expected, but nothing is actually installed.

In other words, the error was in the method of testing.

更多推荐

功能,feature,安装,电脑培训,计算机培训,IT培训"/> <meta name="description&quo

本文发布于:2023-07-18 04:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154813.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:情况下   功能   WIX   default   Enable

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!