0

I have an installer for a Lotus Notes extension. I need to add entries to the notes.ini file so that it will call my extension. I'm using the <IniFile addTag> as follows:

    <Directory Id="LOTUSNOTESINSTALLDIRECTORY">
        <Component Id="NOTESINIADDINMENUS" Guid="{FC239067-1B5D-48b4-AA9A-8B89F62F21E7}" KeyPath="yes" Win64="no">
          <IniFile Id="HLBridgeDLLINI" Action="addTag" Directory="LOTUSNOTESINIDIRECTORY" Name="Notes.ini" Section="Notes" Key="AddInMenus" Value="HLBridge.dll"/>
        </Component>
    ...

This does exactly what I want on initial install. However, when I apply an MSP patch, the entry gets written again, resulting in a double entry for HLBridge.dll.

I have tried using a condition such as "&Feature=3 AND !Feature=2" to only do the addTag if the feature is first being installed, but apparently in Wix the feature values are not available at this point. (I can't find the stackoverflow answer that told me why it wasn't working.)

Perhaps addLine would not have this problem, but would disable other installed Notes extensions.

Is there a way to handle this without writing a custom action?

jsparkes
  • 161
  • 1
  • 11

1 Answers1

1

You could use an additional component where you add the IniFile-tag and an additional Condition-tag, so this component and therefore also the related IniFile-modification is only executed if the condition is met.
For the condition itself you can take also a look at e.g. this question where the PATCH-property is also used in the condition.

Community
  • 1
  • 1
taffit
  • 1,979
  • 22
  • 23
  • Thanks for the pointer. Using `<![CDATA[NOT Installed AND NOT Patch]]>` solves this problem. Unfortunately, I've also discovered that a repair install has this problem too. There doesn't appear to be a REPAIR variable and I haven't worked out the expression to exclude repair as well. – jsparkes Feb 12 '14 at 18:18
  • 1
    @jsparkes See this [article](http://code.dblock.org/msi-property-patterns-upgrading-firstinstall-and-maintenance) on detecting scenarios. Also the comment to the article regarding the updated WiX upgrade element. – Tom Blodget Feb 13 '14 at 01:00