Can I rely on MSXML4 being present?

599 views Asked by At

We test the setup of our software on "clean install" images of windows XP, Vista and windows 7 before release.

Some old code in the software still relies on MSXML4. Until now, I had assumed that it is not necessary to install MSXML4 because apparently it is already present on clean installs of windows. However, now I have a strange report from a windows XP user that MSXML4 is missing on his machine and our software is not working.

Does this mean that our clean install images are not as clean as we thought? Or is a Windows XP system without msxml4 a pathological anomaly?

3

There are 3 answers

1
NickFitz On BEST ANSWER

From Microsoft's XML Team: Using the Right Version of MSXML in Internet Explorer. It's three years old, but still contains everything you really need to know; also, it's not just relevant to IE, as it talks in more generic terms about the different versions of MSXML.

Quick and dirty answer, from that article:

MSXML 3.0 is our preferred “fallback” - It is installed on every OS from a fully patched Win2k SP4 installation on up, so it requires “zero-deployment” and is serviced regularly with the OS

EDIT: some additional relevant bits from TFA:

MSXML3 doesn't have all the improvements in MSXML6, but developers should consider it a robust and stable platform for MSXML applications... MSXML4 was a predecessor to MSXML6 but hasn't ever shipped in the operating system.

0
Paul Sonier On

You can assume that it's an anomaly. I'd bet that the user has removed MSXML from their machine, whether intentionally or accidentally.

That said, you should still check for the existence of MSXML4 at install time, and error out if it isn't present.

0
Heinzi On

There's no MSXML4 on my Windows 7 x64 Pro machine -- only MSXML3 and MSXML6 (although I'm not sure whether they were included in Windows or came, e.g., with Office). Since I'm pretty sure that I did not manually remove any system DLLs from my PC, I conclude that you cannot rely on MSXML4 being installed.

PS: No, MSXML6 does not emulate MSXML4... Set x = CreateObject("Msxml2.DOMDocument.4.0")fails in Word VBA on my machine, but Set x = CreateObject("Msxml2.DOMDocument.6.0") works.