Actually, I did run into an issue with trying your solution, and was curious
if you or anybody else had an idea:

In the <Directory> that contains the 'base-config.xml' and
'extras-config.xml' Components I put the following:

          <Component Id="CMP_BaseCopyConfig"
Guid="2E5C60C4-956A-11E0-BC3C-BCD94824019B">
            <Condition>NOT &amp;ExtrasFeature=3</Condition>
            <CopyFile Id="Copy_Base_Config"
                      SourceName="base-config.xml"
                      DestinationDirectory="DIR_6"
DestinationName="config.xml" />
          </Component>

          <Component Id="CMP_ExtrasCopyConfig"
Guid="399EA6B8-956A-11E0-8EC6-CBD94824019B">
            <Condition>&amp;ExtrasFeature=3 AND NOT
!ExtrasFeature=3</Condition>
            <CopyFile Id="Copy_Extras_Config"
                      SourceName="extras-config.xml"
                      DestinationDirectory="DIR_6"
DestinationName="config.xml" />
          </Component>

In this, DIR_6 is the ID of the directory I'm copying to, DIR_36 is the ID
of the containing <Directory> that I'm copying from.
 With the above I get the following error from light:

Components.wxs(617) : error LGHT0204 : ICE18: KeyPath for Component:
'CMP_BaseCopyConfig' is Directory: 'DIR_36'. The Directory/Component pair
must be listed in the CreateFolders table.
Components.wxs(624) : error LGHT0204 : ICE18: KeyPath for Component:
'CMP_ExtrasCopyConfig' is Directory: 'DIR_36'. The Directory/Component pair
must be listed in the CreateFolders table.

I haven't seen any examples of using CopyFile that specified anything about
a KeyPath, so am somewhat at a loss for how to proceed here.  Any
suggestions?

Thanks,
Dave

On Mon, Jun 13, 2011 at 10:01 AM, Dave Combs <dave.co...@kaazing.com> wrote:

> Thanks (both Pally and Rob.) I actually do need the originals to continue
> to exist as well, so will go with your solution, Pally. (What gets even
> weirder is that I also need to do something when somebody does an update to
> include the 'extras' bundle after initially installing the 'base' bundle.
> In that case, I've been asked to copy the copy (take config.xml and copy to
> config.xml.bkup) and then do the copy of extras-config.xml to config.xml.
> Messy, I know.
>
> Thanks again!
> Dave
>
>
> On Mon, Jun 13, 2011 at 4:08 AM, Pally Sandher <pally.sand...@iesve.com>wrote:
>
>> Ah I missed Rob's reply before I posted my own. I agree with Rob if you
>> don't need the original config.xml file(s) to exist for the user simply
>> skip the copy & use mutually exclusive Component Conditions to install
>> either file to the desired location.
>> If you do need the base-config.xml & extras-config.xml to exist as well
>> as config.xml then see my previous post.
>>
>> Palbinder Sandher
>> Software Deployment Engineer
>> T: +44 (0) 141 945 8500
>> F: +44 (0) 141 945 8501
>>
>> http://www.iesve.com
>> **Design, Simulate + Innovate with the <Virtual Environment>**
>> Integrated Environmental Solutions Limited. Registered in Scotland No.
>> SC151456
>> Registered Office - Helix Building, West Of Scotland Science Park,
>> Glasgow G20 0SP
>> Email Disclaimer
>>
>> -----Original Message-----
>> From: Rob Mensching [mailto:r...@robmensching.com]
>> Sent: 13 June 2011 04:17
>> To: General discussion for Windows Installer XML toolset.
>> Subject: Re: [WiX-users] looking for some help on a file-copying task
>> duringinstall
>>
>> I'd avoid CopyFile personally and just have a couple extra Components
>> (conditioned correctly) to install the file.
>>
>> On Sun, Jun 12, 2011 at 7:32 PM, Dave Combs <dave.co...@kaazing.com>
>> wrote:
>>
>> > I was hoping somebody could help with my confusion on a <CopyFile>
>> issue.
>> >
>> > I have a WiX configuration to install a product with 2 features, call
>> them
>> > 'base' and 'extras'. 'base' is required, and 'extras' is optional.
>> Both
>> > 'base' and 'extras' have a config file (called 'base-config.xml' and
>> > 'extras-config.xml').  At some point during installation, one or the
>> other
>> > of the two files (depending on what features have been chosen) needs
>> to be
>> > copied into another directory, with the file name 'config.xml'.
>> >
>> > My problem is that I can see that <CopyFile> can be applied inside a
>> <File>
>> > component to copy that component (but then I have 2 guys trying to go
>> to
>> > the
>> > same place), or inside its own <Component> (but isn't that only for
>> files
>> > that are already on the destination machine?)
>> >
>> > Can anybody either point out where I'm going wrong or suggest a
>> solution?
>> >
>> > Thanks!
>> > Dave
>> >
>> >
>> ------------------------------------------------------------------------
>> ------
>> > EditLive Enterprise is the world's most technically advanced content
>> > authoring tool. Experience the power of Track Changes, Inline Image
>> > Editing and ensure content is compliant with Accessibility Checking.
>> > http://p.sf.net/sfu/ephox-dev2dev
>> > _______________________________________________
>> > WiX-users mailing list
>> > WiX-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wix-users
>> >
>> >
>>
>>
>> --
>> virtually, Rob Mensching - http://RobMensching.com LLC
>> ------------------------------------------------------------------------
>> ------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to