I am creating a WiX installer for our software which requires msxml 6. If I understand correctly msxml 6 is shipped with Windows starting from XP SP3 but since our software supports all versions of XP I guess there is a risk that the customer won't have msxml 6 installed; thus I would like msxml 6 to be installed by our installer if it is not already installed.
I found this page that shows how to detect if msxml 6 is installed on the computer but it doesn't say which version (SP1, SP2 etc.) is installed.
My question is how do I properly detect if msxml 6 is installed and install the latest version if it is not detected?
This is what I am using now to perform the detection (a combination of what I found in the link above and what I use for other prerequisites):
<!-- MSXML6 SP1 (x86) -->
<util:RegistrySearch Root="HKCR" Key="Msxml2.DOMDocument.6.0" Format="raw"
Variable="MsXml6x86Installed" />
<PackageGroup Id="MsXml6x86">
<MsiPackage Id="MsXml6x86" Cache="no" Compressed="yes" Permanent="yes" Vital="yes"
SourceFile="$(var.PrerequisitesPackagesRootPath)\msxml6_SP1_x86\msxml6_x86.msi"
InstallCondition="(VersionNT < v6.0) AND (NOT MsXml6x86Installed)" />
</PackageGroup>
<!-- MSXML6 SP1 (x64) -->
<util:RegistrySearch Root="HKCR" Key="Msxml2.DOMDocument.6.0" Format="raw"
Variable="MsXml6x64Installed" Win64="yes" />
<PackageGroup Id="MsXml6x64">
<MsiPackage Id="MsXml6x64" Cache="no" Compressed="yes" Permanent="yes" Vital="yes"
SourceFile="$(var.PrerequisitesPackagesRootPath)\msxml6_SP1_x64\msxml6_x64.msi"
InstallCondition="(VersionNT64 < v6.0) AND (NOT MsXml6x64Installed)" />
</PackageGroup>
And in my Bundle (x86):
<Bundle>
...
<Chain>
<PackageGroupRef Id="MsXml6x86"/>
<PackageGroupRef Id="Vc2010Sp1x86" />
<PackageGroupRef Id="Netfx35Sp1" />
<PackageGroupRef Id="Netfx4Full" />
...
</Chain>
</Bundle>
When I start my installer I get the following output in the log file:
[21E4:3F00][2015-02-11T09:57:31]i000: Setting string variable 'MsXml6x86Installed' to value 'XML DOM Document 6.0'
[21E4:3F00][2015-02-11T09:57:31]i101: Detected package: MsXml6x86, state: Absent, cached: None
So the registry key I search for is found which suggests msxml 6 exists but the actual package does not. I guess the reason is that when I search for the msxml6.dll my Win 7 computer appears to have SP3 installed while the msxml package I am using in the installer is for SP1? But this is where I don't know what to do; on our Win 7 test computer msxml 6 SP3 is installed by default and our Win XP SP3 test computer has msxml 6 SP2 installed by default. Which msxml package should I use in the installer in order to get a solution for all versions of Windows starting from XP? I am not able to find a download link to SP3 or SP2 om Microsoft's website.
I appreciate any help.