Hi Brian, Thanks for the link, somehow I missed some information published there. In any case, I cannot use - don't want :^) - CA 35/51. The problem description is simple, I have a generic setup creating a sub-folder under Program Files, Common Files and System32, the subfolder name is the same (not the contents), and its name is configurable, I use the same wix fragment for several products. If I use CA 35 I need to define 3 different properties. Also the directory structure is totally ignored (which bothers me the most), I can set a subfolder under Common Files, but setting a property with the full path it will thrown out to let's say: C:\Temp.
Here is the WIX code I would like to have: <Directory Id="INSTALLDIR" Name="INSTALLDIR"/> <!-- Get INSTALLDIR from the command line --> <Directory Id="Common" Name="Common"> <Directory Id="DIRID" Name="[DIRPATH]"/> </Directory> </Directory> <CustomAction Id="SetDIRPATH" Property="DIRPATH" Value="The Folder" /> ^-- the code above fails v--- the code below works well <CustomAction Id="SetDIRPATH" Property="DIRID" Value="[ProgramFilesFolder]Common\The Folder" /> But I have to define the whole path. In order to solve the problem, I need a way to tell Windows Installer (through WIX) to resolve the property value for DIRPATH, and use it when solving the full path for DIRID. Kind of replacing [DIRPATH] on column Default Dir / table Directory with the actual property value. Mmm, it looks that this is what my CA needs to do. Thanks Brian, I will try to code this.... Regards, Eitan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Rogers Sent: Monday, August 04, 2008 7:27 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Changing Directories Dynamically Hey Eitan, It is difficult to handle the hierarchy issue you explained below. A Custom Action Type 35 (http://msdn.microsoft.com/en-us/library/aa368093(VS.85).aspx) will allow you set a formatted string. You could use the parent directory value in the text which will be expanded. I am not sure of another way unless you were to write your own CA. -- Brian Rogers "Intelligence removes complexity." - Me http://icumove.spaces.live.com On Mon, Aug 4, 2008 at 1:44 AM, Eitan Behar <[EMAIL PROTECTED]> wrote: > Hi, > > I need to find a way to change the name of a directory dynamically, > something like: > > <Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder" /> > <Directory ... > <Directory Id="DIRID" Name="[DIRPATH]"> > > Where DIRPATH *only* contains the folder name i.e. MyFolder > > I am aware of using CAs to set a property, and using directly the syntax: > <Directory Id="DIRPATH"> > But this will force me to ignore the tree hierachy, and set the property > as: > "C:\Program Files\Whatever\Ever\My Folder\" which I don't want to do. > > Any advice will be highly appreciated. > > Thanks in advance, > > Eitan > ------------------------------------------------------------------------- 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 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