I am trying to have my installer edit an XML file after it is installed.
However, the XML file should not be installed or edited if it already
exists on the system.  So I am trying to condition the installation of
the XML editing component on the state/action of the component which
contains the XML file to be edited.  But its not working.

I am seeing some conflicting info in the Windows Installer documentation
that in one place states the component state can only be used in the
condition table and the sequence tables, while the Component table
documentation states that the Condition column "accepts conditional
expressions containing references to the installed states of features
and components...".  

So which is it? 
Any idea what I'm doing wrong?


<Directory Id="INSTALLDIR" Name="FrzFrame" LongName="StarWitness
FreezeFrame">
   <Component Id="c_SysConfig_xml" 
    Guid="0AD3B4EF-331D-4018-9694-7C738D13F86F" 
    DiskId="1" NeverOverwrite="yes" Permanent="yes">
     <File Id="f_SysConfig_xml" Name="SysConf.xml"
LongName="SysConfig.xml" KeyPath="yes"
      Source="$(var.stageDir)\SysConfig.xml" />
   </Component>

   <Component Id="c_EditSysConfig_xml"
Guid="426C9462-C96C-4abe-8665-89523F9725C6" DiskId="1">
      <!-- Only edit the sysconfig.xml file if it is being installed
-->
      <Condition ><![CDATA[$c_SysConfig_xml=3]]></Condition>

      <XmlFile Id="xml_SetCaseRootDir" File="[#f_SysConfig_xml]"
         ElementPath="//configuration/caseRootDir"
Value="[DATAFILESTOREDIR]" 
         Action="setValue" Sequence="1"/>
      <XmlFile Id="xml_SetCaptureDir" File="[#f_SysConfig_xml]"
         ElementPath="//configuration/captureDir"
Value="[MEDIAFILESTOREDIR]" 
         Action="setValue" Sequence="2"/>
      <XmlFile Id="xml_SetTempDir" File="[#f_SysConfig_xml]"
         ElementPath="//configuration/tempDir" Value="[TEMPDIR]" 
         Action="setValue" Sequence="3"/>
   </Component>
</Directory>



--
Bill Arnette
Principal Software Developer
StarWitness Business Unit
Signalscape, Inc.
www.starwitness.com
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to