Note that there are some explanatory texts on larger screens.

plurals
  1. POWiX: Changing the path of a directory does not change the path of a sub directory?
    primarykey
    data
    text
    <p>I have a WiX installer that includes this declaration of directories:</p> <pre><code>&lt;Directory Id="TARGETDIR" Name="SourceDir"&gt; &lt;Directory Id="ProgramFiles64Folder"&gt; &lt;Directory Id="MyCorp" Name="MyCorp"&gt; &lt;Directory Id="INSTALLFOLDER" Name="FlowApp"&gt; &lt;Directory Id="FLOW_COMPONENTS" Name="Components"/&gt; &lt;Directory Id="FLOW_CONFIGURATION" Name="Configuration"/&gt; &lt;/Directory&gt; &lt;/Directory&gt; &lt;/Directory&gt; &lt;/Directory&gt; </code></pre> <p>And I have a dialog to allow the install folder location to be changed:</p> <pre><code>&lt;Fragment&gt; &lt;UI&gt; &lt;Dialog Id="LocationDialog" Title="FlowMaster 3000 server deployment" Width="370" Height="270" NoMinimize="no"&gt; &lt;Control Id="PathLabel" Type="Text" Text="Install folder" X="10" Y="30" Width="70" Height="15" TabSkip="yes"/&gt; &lt;Control Id="InstallPath" Type="Edit" Property="INSTALLFOLDER" Text="{80}" X="100" Y="30" Width="260" Height="15" /&gt; </code></pre> <p>This works fine when the location is not changed, but when the location is changed by the user, although the INSTALLFOLDER variable is correctly changed, the FLOW_COMPONENTS and FLOW_CONFIGURATION variables retain their original paths. See log:</p> <pre><code>Action start 14:38:59: CostFinalize. MSI (c) (B8:B0) [14:38:59:308]: Dir (target): Key: INSTALLFOLDER , Object: C:\Program Files\MyCorp\FlowApp\ MSI (c) (B8:B0) [14:38:59:308]: Dir (target): Key: FLOW_COMPONENTS , Object: C:\Program Files\MyCorp\FlowApp\Components\ MSI (c) (B8:B0) [14:38:59:308]: Dir (target): Key: FLOW_CONFIGURATION , Object: C:\Program Files\MyCorp\FlowApp\Configuration\ Action 14:39:03: LocationDialog. Dialog created MSI (c) (B8:48) [14:39:07:302]: PROPERTY CHANGE: Modifying INSTALLFOLDER property. Its current value is 'C:\Program Files\MyCorp\FlowApp\'. Its new value: 'D:\Program Files\MyCorp\FlowApp\'. Action start 14:39:37: ExecuteAction. MSI (s) (64:20) [14:39:39:652]: PROPERTY CHANGE: Adding INSTALLFOLDER property. Its value is 'D:\Program Files\MyCorp\FlowApp\'. MSI (s) (64:20) [14:39:39:652]: PROPERTY CHANGE: Adding FLOW_CONFIGURATION property. Its value is 'C:\Program Files\MyCorp\FlowApp\Configuration\'. MSI (s) (64:20) [14:39:39:653]: PROPERTY CHANGE: Adding FLOW_COMPONENTS property. Its value is 'C:\Program Files\MyCorp\FlowApp\Components\'. </code></pre> <p>Which leads to an attempt to create the sub-folders under a folder that doesn't exist.</p> <p>What should I add to have the change of the install folder's path flow to its sub-folders?</p> <p><strong>EDIT</strong></p> <p>The directories are populated. One in a separate wxs file with a group of files harvested by Heat, and the other like this:</p> <pre><code>&lt;ComponentGroup Id="Configuration" Directory='FLOW_CONFIGURATION'&gt; &lt;Component Id="Install.json" Guid="MY_GUID" &gt; &lt;File Id="Install.json" Name="Install.json" Source="$(var.SolutionDir)Configuration\Install.json" KeyPath="yes" /&gt; &lt;/Component&gt; &lt;/ComponentGroup&gt; </code></pre> <p>I initially had the component groups referenced simply in my feature:</p> <pre><code>&lt;Feature Id="Everything" Level="1" Display='expand' ConfigurableDirectory='INSTALLFOLDER'&gt; &lt;ComponentGroupRef Id="Components" /&gt; &lt;ComponentGroupRef Id="Configuration" /&gt; &lt;/Feature&gt; </code></pre> <p>But I've now made them sub-features with their own ConfigurableDirectory attribute:</p> <pre><code>&lt;Feature Id="Everything" Level="1" Display='expand' ConfigurableDirectory='INSTALLFOLDER'&gt; &lt;Feature Id="SubComponents" ConfigurableDirectory='FLOW_COMPONENTS'&gt; &lt;ComponentGroupRef Id="Components" /&gt; &lt;/Feature&gt; &lt;Feature Id="SubConfiguration" ConfigurableDirectory='FLOW_CONFIGURATION'&gt; &lt;ComponentGroupRef Id="Configuration" /&gt; &lt;/Feature&gt; &lt;/Feature&gt; </code></pre> <p>I don't notice a difference either way.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload