I have two components that each installs a config file. Based on a
condition, only one component is run and one config file is installed.
The two source config files have different names, but I want to refer to
them using the same name in another component where I call the XmlFile and
XmlConfig to update the xml contents.
Here is my code:
<Property Id="PLUGINS_PATH" Value="Plugins\plugins.xml" />
<Property Id="USE_WCFBINDING" Value="Yes"/>
<Component Id="CompBusinessHost"
Guid="{4BE963AB-0290-43a1-A1E3-FC0704FE5563}" KeyPath="no">
<File Id="File1" KeyPath="yes" Name="BusinessHost.exe"
Source="$(var.SourceFolder)\BusinessHost.exe" />
</Component>
<Component Id='CompConfigFile'
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='CompBasicHttpConfigFile'
Guid='{390B30D5-79DF-483e-91F9-68FED459F6C0}'>
<Condition>USE_WCFBINDING~<>"Yes"</Condition>
<File Id='File3' Name='BusinessHost.exe.config'
Source='$(var.SourceFolder)\BusinessHostBasicHttpApp.Config' />
</Component>
<Component Id='CompConfigFile' 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>
If I skip <util:XmlFile>, everything works fine.
"BusinessHostBasicHttpApp.Config" is installed with the correct name,
"BusinessHost.exe.config".
But if I enable <util:XmlFile>, and specify USE_WCFBINGING=NO, I get an
error message:
"Failed to open XML file C:\Program Files\VBus\BusinessHost.exe.config.
system error: -2147024786"
It seems that "CompConfigFile" is run before "CompBasicHttpConfigFile". Is
there a way to specify the sequence of the components??
Thanks for any advice.
-------------------------------------------------------------------------
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