I know there is a long-winded way of doing this which bloats my MSI by
having duplicates of the files in it but I was wondering if there's any
easier/cleaner way of achieving the same thing.

Basically I have 2 directories which are set by RegistrySearch
Properties which, depending on whether the RegistrySearches are
successful, will have the same files installed to one or crucially both.

Code extracts as follows:

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="FIRSTAPPLOCATION" Name="First App">
          <Directory Id="Plugins" Name="Plugins" />
        </Directory>
        <Directory Id="SECONDAPPLOCATION" Name="Second App">
          <Directory Id="Plugins" Name="Plugins" />
        </Directory>
      </Directory>
    </Directory>

    <Feature Id="ProductFeature" Title="MyPlugin" Level="1">
      <Feature Id="FirstAppPlugin" AllowAdvertise="no" Display="hidden"
Level="9999">
        <Condition Level="1">
          <![CDATA[FIRSTAPPLOCATION]]>
        </Condition>
        <ComponentGroupRef Id="MyPlugin" Primary="yes" />
      </Feature>
      <Feature Id="SecondAppPlugin" AllowAdvertise="no" Display="hidden"
Level="9999">
        <Condition Level="1">
          <![CDATA[SECONDAPPLOCATION]]>
        </Condition>
        <ComponentGroupRef Id="MyPlugin" Primary="yes" />
      </Feature>
    </Feature>


  <Fragment>
    <DirectoryRef Id="Plugins">
      ...
    </DirectoryRef>

    <ComponentGroup Id="MyPlugin">
      ...
    </ComponentGroup>
  </Fragment>

There is nothing other than Files in my components. The user could have
either only the first app installed, only the second app installed or
both installed.

I know I could take a copy of the lower fragment & modify all the Id's
so that it will install to the 2nd Plugins directory but I'd be much
happier if I could do this without having to (unnecessarily) include 2
copies of every file in the MSI.

I think having a component in 2 places in the same installer isn't
allowed by the component rules but is there any way to have a file in 2
components?

If anyone has any ideas it'd be most appreciated.

Thanks,

Palbinder Sandher 
Software Deployment Engineer 

T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 
http://www.iesve.com 

**Design, Simulate + Innovate with the <Virtual Environment>**

Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP

Email Disclaimer

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to