Re: [WiX-users] Using XmlFile in a merge module
Here's a sample that demonstrates the problem: ?xml version=1.0 encoding=UTF-8? Wix xmlns=http://schemas.microsoft.com/wix/2006/wi; xmlns:sql=http://schemas.microsoft.com/wix/SqlExtension; xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension; xmlns:util=http://schemas.microsoft.com/wix/UtilExtension; Module Guid=02f45038-587d-4cc0-af41-0380cf378c2c Id=TestMergeModule Language=1033 Version=1.0.0.0 Package Id=02f45038-587d-4cc0-af41-0380cf378c2d InstallerVersion=200 Manufacturer=Test Company Compressed=yes / Directory Id=TARGETDIR Name=SourceDir Directory Id=ProgramFilesFolder Directory Id=MANUFACTURERFOLDER Name=Test Company Directory Id=INSTALLLOCATION Name=Test Product Directory Id=TESTPATH Name=Test Path Component Id=WebConfigComponent Guid=02440d26-f08c-4b28-b037-8303314ff4dd File Id=WebCONFIG Name=Web.config ReadOnly=no Source=$(var.SourceDir)Web.config/ util:XmlFile Id=ModifyValue Action=setValue ElementPath=/configuration/ValueConfiguration File=[TESTPATH]web.config Value=Value/ CreateFolder/ /Component /Directory /Directory /Directory /Directory /Directory /Module /Wix If I remove the util:XmlFile line, the merge module will correctly copy web.config. With that line, I get failure to configure XML files error, and web.config has not been copied. Is there anything I can do here? csellers wrote: I currently have an MSI Wix project that (among other things) copies an xml file and makes modifications to it using util:XmlFile. I am in the process of converting this project to a merge module (MSM), but when I include the merge module in another install, I get an error saying there was a failure while configuring XML files. I then noticed that I get this error before the xml file had been copied (which would explain the error). I did not have this problem when I was building an msi file. Looking at the log file, the failure is in SchedXmlFile, which is occurring before any files have been copied. If I remove the XmlFile commands, the install runs without any problems. Is there a reason why this is happening in the merge module when it didn't in the msi? Is there anyway to control when SchedXmlFile runs? -- View this message in context: http://www.nabble.com/Using-XmlFile-in-a-merge-module-tp14519897p14582035.html Sent from the wix-users mailing list archive at Nabble.com. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Using XmlFile in a merge module
csellers wrote: We are using Wix build 3.0.2925.0 Please try the latest weekly release. The version you're using is over six months old. And please include the exact error message from a verbose log, to get the details the CA logs. Looking at this, you would think SchedXmlFile would occur after InstallFiles, but it doesn't seem to work this way. SchedXmlFile is an immediate custom action; it runs while the installation script is being generated. It tells MSI to run other CAs when the script is executed (which is when the files are actually installed). -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Using XmlFile in a merge module
Merge modules are for providing to third parties, for them to integrate into their installers. If you're only using this common code in-house, in other WiX-based installers, I recommend building and sharing a .wixlib instead (or you can simply share the .wxs source code, the .wixlib simply saves some compilation time). Sharing components between product installers is being de-emphasised as it leads to trouble with servicing - you cannot target a component with a patch, only a product, so if a defect is discovered in a common component, all products which installed that component have to be patched, unless some other mechanism is available to redirect clients to the new version (e.g. publisher policy in .NET and Win32 assemblies). In answer to your question, the scheduling of custom actions contained in a merge module is controlled by the ModuleInstallExecuteSequence table. Unlike in the master InstallExecuteSequence table, the merge module can specify a sequence relative to a base action rather than a specific sequence. The absolute sequence number is resolved when the module is merged in. This requires that a merge tool is used which understands this - the standard mergemod.dll does. WiX interprets InstallExecuteSequence elements to generate rows in the InstallExecuteSequence for the main installer, if building an .msi (the Product element) or in the ModuleInstallExecuteSequence for a merge module. The standard scheduling of SchedXmlFile, as of at least 3.0.3502, is to come after InstallFiles, but this can be overridden in your own InstallExecuteSequence. To confirm the problem could you post: - The exact version of WiX you're using, including build number; - The name and version of the tool used to build the final .msi; - If you have access to Orca, or another tool for viewing .msm contents, the contents of the ModuleInstallExecuteSequence table from the .msm (specifically the SchedXmlFile row). -- Mike Dimmick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of csellers Sent: 27 December 2007 23:00 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Using XmlFile in a merge module I currently have an MSI Wix project that (among other things) copies an xml file and makes modifications to it using util:XmlFile. I am in the process of converting this project to a merge module (MSM), but when I include the merge module in another install, I get an error saying there was a failure while configuring XML files. I then noticed that I get this error before the xml file had been copied (which would explain the error). I did not have this problem when I was building an msi file. Looking at the log file, the failure is in SchedXmlFile, which is occurring before any files have been copied. If I remove the XmlFile commands, the install runs without any problems. Is there a reason why this is happening in the merge module when it didn't in the msi? Is there anyway to control when SchedXmlFile runs? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Using XmlFile in a merge module
Thank you very much for your reply. We are planning on providing this part of the install to third parties, so the merge module approach is desirable. My answers in bold. - The exact version of WiX you're using, including build number; We are using Wix build 3.0.2925.0 - The name and version of the tool used to build the final .msi; We are using Votive v3 - If you have access to Orca, or another tool for viewing .msm contents, the contents of the ModuleInstallExecuteSequence table from the .msm (specifically the SchedXmlFile row). This is the part that has me stumped. This is the contents of the SchedXmlFile row: Action: SchedXmlFile Sequence: [blank] BaseAction: InstallFiles After: 1 Condition: [blank] Looking at this, you would think SchedXmlFile would occur after InstallFiles, but it doesn't seem to work this way. Any thoughts? Mike Dimmick-2 wrote: Merge modules are for providing to third parties, for them to integrate into their installers. If you're only using this common code in-house, in other WiX-based installers, I recommend building and sharing a .wixlib instead (or you can simply share the .wxs source code, the .wixlib simply saves some compilation time). Sharing components between product installers is being de-emphasised as it leads to trouble with servicing - you cannot target a component with a patch, only a product, so if a defect is discovered in a common component, all products which installed that component have to be patched, unless some other mechanism is available to redirect clients to the new version (e.g. publisher policy in .NET and Win32 assemblies). In answer to your question, the scheduling of custom actions contained in a merge module is controlled by the ModuleInstallExecuteSequence table. Unlike in the master InstallExecuteSequence table, the merge module can specify a sequence relative to a base action rather than a specific sequence. The absolute sequence number is resolved when the module is merged in. This requires that a merge tool is used which understands this - the standard mergemod.dll does. WiX interprets InstallExecuteSequence elements to generate rows in the InstallExecuteSequence for the main installer, if building an .msi (the Product element) or in the ModuleInstallExecuteSequence for a merge module. The standard scheduling of SchedXmlFile, as of at least 3.0.3502, is to come after InstallFiles, but this can be overridden in your own InstallExecuteSequence. To confirm the problem could you post: - The exact version of WiX you're using, including build number; - The name and version of the tool used to build the final .msi; - If you have access to Orca, or another tool for viewing .msm contents, the contents of the ModuleInstallExecuteSequence table from the .msm (specifically the SchedXmlFile row). -- Mike Dimmick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of csellers Sent: 27 December 2007 23:00 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Using XmlFile in a merge module I currently have an MSI Wix project that (among other things) copies an xml file and makes modifications to it using util:XmlFile. I am in the process of converting this project to a merge module (MSM), but when I include the merge module in another install, I get an error saying there was a failure while configuring XML files. I then noticed that I get this error before the xml file had been copied (which would explain the error). I did not have this problem when I was building an msi file. Looking at the log file, the failure is in SchedXmlFile, which is occurring before any files have been copied. If I remove the XmlFile commands, the install runs without any problems. Is there a reason why this is happening in the merge module when it didn't in the msi? Is there anyway to control when SchedXmlFile runs? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- View this message in context: http://www.nabble.com/Using-XmlFile-in-a-merge-module-tp14519897p14532015.html Sent from the wix-users mailing list archive at Nabble.com. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Using XmlFile in a merge module
I currently have an MSI Wix project that (among other things) copies an xml file and makes modifications to it using util:XmlFile. I am in the process of converting this project to a merge module (MSM), but when I include the merge module in another install, I get an error saying there was a failure while configuring XML files. I then noticed that I get this error before the xml file had been copied (which would explain the error). I did not have this problem when I was building an msi file. Looking at the log file, the failure is in SchedXmlFile, which is occurring before any files have been copied. If I remove the XmlFile commands, the install runs without any problems. Is there a reason why this is happening in the merge module when it didn't in the msi? Is there anyway to control when SchedXmlFile runs? -- View this message in context: http://www.nabble.com/Using-XmlFile-in-a-merge-module-tp14519897p14519897.html Sent from the wix-users mailing list archive at Nabble.com. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users