我有 2 个功能(功能 1 和功能 2),它们都使用这样的通用组件组:
<Feature1 ...
<ComponentGroupRef Id="compA">
>
和相同的:
<Feature2 ...
<ComponentGroupRef Id="compA">
>
比较:
<Component Id="ComponentA">
<Shortcut Id="ImportantShortcurt" Advertise="yes" Directory="..."
Name="..." LongName="..." Icon="..."/>
</Component>
该组件包含在
<ComponentGroup Id="compA">
<ComponentRef Id="ComponentA" />
....
</ComponentGroup>
用户可以选择同时安装 Feature1、Feature2。如果他选择安装两者或 Feature2 - 一切正常,如果只有 Feature1,但不是 Feature2 - 一切正常,除了没有 ID 为“ImportantShortcut”的快捷方式(文件已安装,只有快捷方式不存在)。
我正在使用 msiexec 进行日志记录。一切似乎都很好,但是
执行操作:我的快捷方式的 ShortcutCreate 不存在
Feature1 在 file1.wxi 中,Feature2 在 file2.wxi 中,它们都包含在产品文件中。
<Fragment ...>
<?Include file1.wxi>
<?Include file2.wxi>
<...>
所以,一个问题:如果 Feature2 不存在,快捷方式在哪里?来自 ComponentA 的所有文件都在这里。