Actually, I ended up doing something I found in the list archives from 19 Oct 2006:
I also found another way of solving this issue. put the component (that contained the <CopyFile>) into a <DirectoryRef Id="TARGETDIR"> element. This is possible because I specify both source (by FileId) and destination (by DestinationProperty) explicitely in the <CopyFile> element. I consider this way of doing it to be cleaner, since I avoid an artificial <CreateFolder> element. Thanks for all the replies anyway. Jarl -- Jarl Friis However, I now run into a different problem that I'm once again looking for clarification or suggestions: The install proceeds correctly until near the end (when it's supposed to do the CopyFile stuff) and I now get an error saying: The installer has insufficient privileges to access this directory: C:\Program Files (x86)\Kaazing\JMS\3.2\Gateway\conf. The installation cannot continue. Log on as administrator or contact your system administrator. My confusion is because a) I have administrator privileges on the system, and b) the installer has already copied several files into the conf directory--all I'm doing is adding another one. Any idea why I would get this error, given that? Thanks, Dave On Mon, Jun 13, 2011 at 10:35 AM, Daniel Madill <dan.mad...@quanser.com>wrote: > I would assume you just need to add a CreateFolder element to ensure the > destination directory is created. For example: > > <CreateFolder Directory="DIR_36"/> > > Dan > > -----Original Message----- > From: Dave Combs [mailto:dave.co...@kaazing.com] > Sent: Monday, June 13, 2011 1:10 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] looking for some help on a file-copying task > during install > > 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 &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>&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 > > > ------------------------------------------------------------------------------ > 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