Hi All, I had appended this query in another topic, so reposting the same under different heading.
I have this requirement in which i want to create directory under C:\Programdata same as what the user specified in the UI dialogue .I am trying to do that using <CopyFile>. Below is the code: <Property Id="CopyDestination" Value="C:\ProgramData\Energy Solutions International\PipelineOptimizer $(var.SvnVersion)"/> <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='EnergySolutions' Name="Energy Solutions International"> <Directory Id='TORT' Name='PipelineOptimizer $(var.SvnVersion)'> </Directory> </Directory> </Directory> <Component Id="PreferencesFile" Guid="{A4E1FFCE-1534-43BF-AA2B-CDFD39381720}" Directory="TARGETDIR"> <File Id='preferences' Source='$(var.GuiPath)\screens\preferences.xml' KeyPath='yes'> <CopyFile Id='Copy_Prefs' DestinationProperty='CopyDestination' /> </File> </Component> <SetDirectory Id="EnergySolutions" Value="C:\Energy Solutions International"/> <Property Id="WIXUI_INSTALLDIR" Value="TORT" /> <UIRef Id="WixUI_InstallDir" /> While doing the installation if the user changes the install directory from the one that is default(it comes out as PipelineOptimizer 06.00.00) to some other name, the file being copied using the <CopyFile> attribute is still copied to the same directory under the programdata as the one which is defaulted in the UI which is to C:\ProgramData\Energy Solutions International\PipelineOptimizer 06.00.00. What i want though is that if the user changes the directory to say PipelineOptimizer 06.00.00 Test, then the file should be copied to the C:\ProgramData\Energy Solutions International\PipelineOptimizer 06.00.00 Test but this does not happen. Is there a way i can achieve the same. I tried using custom action to set the property "CopyDestination" but was not able to do so. Please let me know if there is a solution to this if possible with some sample code. Also is there a way in which we can create 2 prompts to the user during install. This would allow us to use the directory variable independent of the path so that we can use this approach for the ProgramData subfolder . i. Prompt 1: The install path. For example, the default path is "C:\Energy Solutions International\". ii.Prompt 2: The install directory. For example, the default directory is "PipelineOptimizer 06.00.00". and then use the value of the install directory somehow to copy the file to right location. Is the above approach possible? Please help as it is urgent for me. Regards, Suvra Jyoti ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users