Each Directory/@Id value is also a property that is the full path to that 
directory. If you don't supply the path for any one of those properties, then 
Windows Installer will create them based on the @Name values and the relative 
positions of the directories. That is what allows <Directory Id="Foo" 
Name="Bar"><Directory Id="ProgramFilesFolder" Name="FooBar"><Directory Id="Bar" 
Name="My Folder"/></Directory></Directory> to make Bar = "C:\Program Files 
(x86)\My Folder" without any consideration of what the value of Foo is.
 
If you need to build a path yourself out of provided properties, you will need 
to build your directory's value by combining the other values. If you know the 
entire path you are trying to build, do it by setting the property before 
CostInitialize. If all you know is the subfolder's name and you need Windows 
Installer to calculate your parent's directory, you will need to create a type 
51 action scheduled after CostFinalize.
 
Blair Murri
 
> From: aks...@microsoft.com
> To: wix-users@lists.sourceforge.net
> Date: Tue, 3 May 2011 18:26:36 +0000
> Subject: Re: [WiX-users] Wix : Specifying Installation Path and sub path as 
> apublic property
> 
> Thanks for the reply. AFAIK, if I have a wix directory structure defined as:
> 
> .
> .
> <Directory Id = "Foo" Name="Foo">
> < Directory Id = "Bar" Name="Bar">
> .
> .
> 
> On installation, I should see the directory structure ...\Foo\Bar\.... Since 
> 'Bar' in this case is considered relative to 'Foo', why is it not in my case 
> mentioned below?
> 
> Putting a question in a different way: suppose I have to create a deep 
> directory structure (let it look like a\B\c\D) during installation, where 'B' 
> and 'D' directory names are supposed to come from public properties passed on 
> during msiexec /i ...., what WiX am I supposed to use in such case?
> 
> Thanks,
> Akshat
> 
                                          
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to