Hi Phil,

Sorry,if my explanation of the requirement was not clear. What I am trying to ask is specifically as below:

When i start installing the application using the installer, then in the UI the default installation path is C:\Energy Solutions International\PipelineOptimizer 06.00.00\, which is editable. I now edit the path in the UI to say C:\Energy Solutions International\PipelineOptimizer Test\. I want somehow to use this input of "PipelineOptimizer Test" in the WIX source file so that i can copy the file preferences.xml to a directory called "PipelineOptimizer Test" under C:\ProgramData\Energy Solutions International. If i did not edit the UI the default path where the file would get copied was C:\ProgramData\Energy Solutions International\PipelineOptimizer 06.00.00.
Below is the screenshot if is the screenshot:


Attaching the screenshots if you are somehow not able to view.

Regards,
Suvra Jyoti

On 13-03-2014 22:11, Phil Wilson wrote:
It's a bit confusing when you say you're trying to create a directory
using <copyfile> because that's not you create directories. It's also
confusing that you have hardcoded the directory as the Program Files
folder.  Typically you use the ProgramFilesFolder like this:

http://wix.tramontana.co.hu/tutorial/getting-started/the-files-inside

and the rest of that tutorial would probably help. Then your copyfile
doesn't refer to your hardcoded path, it does a copy from SourceDir to
INSTALLFOLDER, which is the property name for the install location
chosen by the user.
---------------
Phil Wilson


On Thu, Mar 13, 2014 at 6:43 AM, Suvrajyoti Panda
<suvrajyo...@contata.co.in> wrote:
Guys, Please let me know if some one has any idea on the below problem.

-------- Original Message --------
Subject:        Creating directory under C:\Programdata same as what the user
specified in the UI dialogue
Date:   Thu, 13 Mar 2014 10:37:13 +0530
From:   Suvrajyoti Panda <suvrajyo...@contata.co.in>
To:     General discussion about the WiX toolset.
<wix-users@lists.sourceforge.net>



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
------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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

Reply via email to