Hi,
 
First of all sorry for the late reply; It's near the summer holliday so
things are a bit busy at home ;)
 

What i mean that went wrong is best illustrated with the following 3
sample pieces (i think you understand what the problem is from this).
 

1. When i use the following everything works as expected:
 
...
  <CustomAction Id="MyAction" BinaryKey="MyCustomActions"
DllEntry="MyAction" />
  <UI>
   <ProgressText Action="MyAction">My action in progress</ProgressText>
  </UI>
  <InstallExecuteSequence>
   <Custom Action="MyAction" After="SchedXmlFile" />
  </InstallExecuteSequence>
...
 <DirectoryRef Id="INSTALLDIR">
  <Component Id="MyOwn.xml" Guid="PUT-GUID-HERE">
   <File Id="File_MyOwn.xml" Name="MyOwn.xml" DiskId="1"
Source="$(var.MySourcePath)\MyOwn.xml" Vital="yes" />
   <XmlFile Sequence="10" Id="MyOwn.xml_License"
File="[INSTALLDIR]MyOwn.xml" Action="createElement" Name="License"
ElementPath="//FooBar" />
   <XmlFile Sequence="11" Id="MyOwn.xml_LicenseMarker"
File="[INSTALLDIR]MyOwn.xml" Action='setValue'      Name='marker'
Value='IGTMB100' ElementPath='//FooBar/License' />
  </Component>
 </DirectoryRef>
 <FeatureRef Id="MainFeature">
  <ComponentRef Id="WInsad.dat" />
 </FeatureRef>
...
 

2. When i drop the XML file but forget to fix the scheduling of
MyAction, the error appears.
Checking with orca i found that SchedXmlFile is still scheduled and that
the entire CA for XML handling was linked into my MSI, although it was
not used.
The XmlTable doesn't exist, this might eventualy be the problem ?
Eg. it does not works as expected:
 
...
  <CustomAction Id="MyAction" BinaryKey="MyCustomActions"
DllEntry="MyAction" />
  <UI>
   <ProgressText Action="MyAction">My action in progress</ProgressText>
  </UI>
  <InstallExecuteSequence>
   <Custom Action="MyAction" After="SchedXmlFile" />
  </InstallExecuteSequence>
...
<!-- Commented out the XML file -->
<!--
 <DirectoryRef Id="INSTALLDIR">
  <Component Id="MyOwn.xml" Guid="PUT-GUID-HERE">
   <File Id="File_MyOwn.xml" Name="MyOwn.xml" DiskId="1"
Source="$(var.MySourcePath)\MyOwn.xml" Vital="yes" />
   <XmlFile Sequence="10" Id="MyOwn.xml_License"
File="[INSTALLDIR]MyOwn.xml" Action="createElement" Name="License"
ElementPath="//FooBar" />
   <XmlFile Sequence="11" Id="MyOwn.xml_LicenseMarker"
File="[INSTALLDIR]MyOwn.xml" Action='setValue'      Name='marker'
Value='IGTMB100' ElementPath='//FooBar/License' />
  </Component>
 </DirectoryRef>
 <FeatureRef Id="MainFeature">
  <ComponentRef Id="WInsad.dat" />
 </FeatureRef>
-->
...
 

3. After fixing the scheduling it works again:
 
...
  <CustomAction Id="MyAction" BinaryKey="MyCustomActions"
DllEntry="MyAction" />
  <UI>
   <ProgressText Action="MyAction">My action in progress</ProgressText>
  </UI>
  <InstallExecuteSequence>
   <!-- No longer after Xml scheduler! Custom Action="MyAction"
After="SchedXmlFile" / -->
   <Custom Action="MyAction" After="InstallFiles" />
  </InstallExecuteSequence>
...
<!-- Commented out the XML file -->
<!--
 <DirectoryRef Id="INSTALLDIR">
  <Component Id="MyOwn.xml" Guid="PUT-GUID-HERE">
   <File Id="File_MyOwn.xml" Name="MyOwn.xml" DiskId="1"
Source="$(var.MySourcePath)\MyOwn.xml" Vital="yes" />
   <XmlFile Sequence="10" Id="MyOwn.xml_License"
File="[INSTALLDIR]MyOwn.xml" Action="createElement" Name="License"
ElementPath="//FooBar" />
   <XmlFile Sequence="11" Id="MyOwn.xml_LicenseMarker"
File="[INSTALLDIR]MyOwn.xml" Action='setValue'      Name='marker'
Value='IGTMB100' ElementPath='//FooBar/License' />
  </Component>
 </DirectoryRef>
 <FeatureRef Id="MainFeature">
  <ComponentRef Id="WInsad.dat" />
 </FeatureRef>
-->
...
 

Hope this helps :-)
 
And yes, INSTALLDIR has the correct value and has nothing to do with the
problem.
I am still using WiX-2.0 (latest) and have not tested the above on
WiX-3.0.
 

Regards,
 
Albert van Peppen


________________________________

Van: Bob Arnson [mailto:[EMAIL PROTECTED] 
Verzonden: woensdag 4 juli 2007 17:00
Aan: Albert van Peppen
CC: wix-users@lists.sourceforge.net
Onderwerp: Re: [WiX-users] Failed to open XML file on Vista


Albert van Peppen wrote: 

        The message appears when you don't have any XmlFile entries in
your wxi script but has an action scheduled as After="XmlSched".
        This implies XmlSched CA is used and so it is placed in the
InstallExecuteSequence but since it has nothing to do, it seems to
generates the error because it's trying to open an empty file (which is
indeed an invalid XML file).


Can you clarify what's happening? Scheduling an action after another
that does no work is perfectly legal.


-- 
sig://boB
http://joyofsetup.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