Hi Bob, thanks for the reply. I've solved the problem myself.
I added a <CopyFile> within <File> to make sure the file is copied and named
exactly the way I want it to be.
I think my original problem was actually how to install a file say FileA as
FileB, and access it as FileB from a <XmlFile> element that resides in a
different component.
<CopyFile> seems to make sure the file is always installed and exists before
any custom action tries to access it.
So here is the code that works.
<Property Id="PLUGINS_PATH" Value="Plugins\plugins.xml" />
<Property Id="USE_WCFBINDING" Value="Yes"/>
<Component Id="BusinessHost" Guid="{4BE963AB-0290-43a1-A1E3-FC0704FE5563}"
KeyPath="no">
<File Id="File1" KeyPath="yes" Name="BusinessHost.exe"
Source="$(var.SourceFolder)\BusinessHost.exe" />
</Component>
<Component Id='WCFConfigFile' Guid='{C0D7BC77-6113-49f5-B0EB-46B30FB9CB81}'>
<Condition>USE_WCFBINDING~="Yes"</Condition>
<File Id='File2' Name='BusinessHost.exe.config'
Source='$(var.SourceFolder)\BusinessHost.exe.config'/>
</Component>
<Component Id='BasicHttpConfigFile'
Guid='{390B30D5-79DF-483e-91F9-68FED459F6C0}'>
<Condition>USE_WCFBINDING~<>"Yes"</Condition>
<File Id='File3' Name='BusinessHost.exe.config'
Source='$(var.SourceFolder)\BusinessHostBasicHttpApp.Config' >
<CopyFile Id="CF1" DestinationLongName="BusinessHost.exe.config"
/> <---- This line solved the problem.
</File>
</Component>
<Component Id='UpdateConfigFile'
Guid='{9A391F9F-B275-45e3-BF25-B87ADBABF621}' KeyPath='yes'>
<util:XmlFile
Id="PluginsPath"
File="[VBusInstalldir]BusinessHost.exe.config"
Action="setValue"
ElementPath="/configuration/appSettings/[EMAIL
PROTECTED]'pluginsPath'[\]]/@value"
Value="[PLUGINS_PATH]"
/>
</Component>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users