0

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 &lt; 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 &lt; 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.

dbostream
  • 781
  • 2
  • 11
  • 27

1 Answers1

1

I don't believe the page you linked is very well thought out. What you need to do (in general) is observe the footprint of any given prereq and make the best choice on how to detect it. For MSXML6 I edited the MSI using ORCA and found the following in the registry table:

SOFTWARE\Microsoft\MSXML 6.0 Parser and SDK\CurrentVersion PatchLevel = 6.00.3883.8

I would go find different sp levels of that MSI and see if you find a trend and then use that in your logic.

Otherwise it is very sound and reasonable approach to put a business/engineering requirement of XP SP3 on your application. If a customer is going to run a legacy OS they should atleast be up to the latest SP. Microsoft has cut off XP of Windows Update and you are on very solid ground to no longer support this OS. The result would be a simpler more reliable installer with less development and test costs.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Thanks for your input, I will push for focusing on XP SP3 and newer only since it is most likely not worth the extra time and effort to cover all versions of XP especially since I believe most customers have moved on to at least Windows 7. – dbostream Feb 11 '15 at 15:08
  • Accepted answers are appreciated. – Christopher Painter Feb 11 '15 at 15:22