[wix-users] Components installed in dependent directories

Phill Hogland phill.hogland at rimage.com
Thu Jul 28 12:07:46 PDT 2016


I have not tried this, but the schema indicates that Directory/@Name is LongFileNameType , for which "The value could also be a localization variable with the format !(loc.VARIABLE). "  And since localizable strings can have inserts, you might be able to use that feature.  And if a CA is needed I think it sounds like a good candidate for a semi-ca of which there are a number of example implementations in the wix\src\ext.    Look at how WcaAddTempRecord() is used.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Calin Iaru <calin_iaru at live.com>
Sent: Thursday, July 28, 2016 1:32:36 PM
To: Hoover, Jacob; WiX Toolset Users Mailing List
Subject: Re: [wix-users] Components installed in dependent directories

Hi Jacob,

 It is not my choice. I think I will insert a CustomAction somewhere and modify the Directory Id.

 For reference, I use this excerpt:
<Feature Id=”ComponentAB”>
  <ComponentRef Id=”ComponentA”/>
  <ComponentRef Id=”ComponentB”/>
</Feature>

<Directory Id=”INSTALLDIR”>
  <Component Id=”ComponentA”>
  <File Name=”FileA”/>
  </Component>
  <Directory Id=”MagicID” Name=”[INSTALLDIRMAGIC]_demo”>
  <Component Id=”ComponentB”>
  <File Name=”FileB”/>
  </Component>
  </Directory>
</Directory>

So, ComponentB’s directory will be named from <ComponentA’s directory>_demo.

This CustomAction is a bit of a crack into the internals of the MSI. Let’s see how it turns out.

Regards,
  Calin



From: Hoover, Jacob<mailto:Jacob.Hoover at greenheck.com>
Sent: Thursday, July 28, 2016 18:40
To: WiX Toolset Users Mailing List<mailto:wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Components installed in dependent directories

Easy answer is to have the user select the root install dir, so in your case C:\Application, and then you simply have A and B as directories nested under it.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Calin Iaru
Sent: Thursday, July 28, 2016 9:29 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Components installed in dependent directories

Hi,

  I have to implement a trick where the Installer creates a 2nd directory based on the name of the INSTALLDIR.
Let’s say that the user installs a component A in c:\Application\ComponentADIR. I need a trick to install component B under c:\Application\ComponentADIR_demo. Both ComponentA and ComponentB are installed at the same time.
  Is there a syntax I can use to accomplish the installation of ComponentB under this constraint?

Thank you,
  Calin




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list