You're trying to copy to a privileged location.  You need to either be 
installing perMachine or you need to elevate and have an installing user with 
Administrator privileges.  An unprivileged user can't install or copy to 
"C:\Program Files" ordinarily.
--
John Merryweather Cooper
Build & Install Engineer - jXchange
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com

________________________________________
From: Suvrajyoti Panda [suvrajyo...@contata.co.in]
Sent: Friday, February 21, 2014 4:07 AM
To: General discussion about the WiX toolset.
Subject: [WiX-users] Not able to copy a file using CopyFile from installers 
install location to a target destination

Hi All,

I have the requirement of creating an installer that on executing will
install to the location  "C:\Energy Solutions
International\PipelineOptimizer 6.0.0" the following 5 directories:
db,data,engine,security, gui. These five directories are being harvested
from a location using Heat. Below is the structure of the Wix source
file i have:

<Property Id="CopyDestination"
Value="$(var.copyRoot)\$(var.rootFolder)\$(var.installFolder)"/>

<Directory Id='TARGETDIR' Name='SourceDir'>
       <Directory Id='EnergySolutions' Name="Energy Solutions
International">
        <Directory Id='TORT' Name='PipelineOptimizer 6.0.0'>
        </Directory>
       </Directory>
     </Directory>

     <SetDirectory Id="EnergySolutions" Value="[WindowsVolume]Energy
Solutions International"/>

     <Feature Id='Complete' Title='Tort Installer' Description='Tort
Installer' Level='1'>
       <ComponentGroupRef Id='db'/>
       <ComponentGroupRef Id='data'/>
       <ComponentGroupRef Id='engine'/>
       <ComponentGroupRef Id='security'/>
       <ComponentGroupRef Id='gui'/>
       <ComponentRef Id="PreferencesFile" />
     </Feature>

   </Product>

I want to copy a file called preferences.xml that will be found under
C:\Energy Solutions International\PipelineOptimizer 6.0.0\gui\screens on
installation to the c:\programdata\Energy Solutions
International\PipelineOptimizer 6.0.0 as this file will be used by an
exe that would be present in the location of the installation at
C:\Energy Solutions International\PipelineOptimizer 6.0.0\gui

I am aware that the CopyFile would be used to do so but am not able to
use it properly. Please suggest some solution around the same.
I have tried something like the below:

<DirectoryRef Id="TORT">
       <Component Id="PreferencesFile"
Guid="{A4E1FFCE-1534-43BF-AA2B-CDFD39381720}">
         <File Id="FilePref" Source="gui\screens\preferencel.xml"
KeyPath="yes">
           <CopyFile Id="Copy" DestinationProperty="CopyDestination"/>
         </File>
        </Component>
     </DirectoryRef>

But this does not work. Please provide some help on this as i am stuck
on this.

Regards,
Suvra Jyoti
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to