Take a look at the duplicate file table, MSI.chm covers it well.

Cheers,
James

-----Original Message-----
From: Pally Sandher [mailto:[EMAIL PROTECTED] 
Sent: 03 November 2008 12:27
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Installing the same files in 2 directories.

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


--
This e-mail is confidential and the information contained in it may be 
privileged.  It should not be read, copied or used by anyone other than the 
intended recipient.  If you have received it in error, please contact the 
sender immediately by telephoning +44 (0)20 7623 8000 or by return email, and 
delete the e-mail and do not disclose its contents to any person.  We believe, 
but do not warrant, that this e-mail and any attachments are virus free, but 
you must take full responsibility for virus checking.  Please refer to 
http://www.dresdnerkleinwort.com/disc/email/ and read our e-mail disclaimer 
statement and monitoring policy.

Dresdner Kleinwort is the trading name of the investment banking division of 
Dresdner Bank AG, and operates through Dresdner Bank AG, Dresdner Kleinwort 
Limited and their affiliated or associated companies.  Dresdner Bank AG is a 
company incorporated in Germany with limited liability and registered in 
England (registered no. FC007638, place of business 30 Gresham Street, London 
EC2V 7PG), and is authorised by the German Federal Financial Supervisory 
Authority and by the Financial Services Authority ('FSA') and regulated by the 
FSA for the conduct of designated business in the UK.  Dresdner Kleinwort 
Limited is a company incorporated in England (registered no. 551334, registered 
office 30 Gresham Street, London EC2V 7PG), and is authorised and regulated by 
the FSA.  


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