Search code examples
inno-setupmsxml

How can I check in Inno Setup if MSXML 4.0 is installed?


What I need to do is to check if Microsoft XML Parser 4.0 SP3 (MSXML) х64 is installed and if not, install it.

This is for old systems where MSXML is probably not installed by default.

How can that be done in Inno Setup?


Solution

  • Based on How determine if MSXML6 is installed in a system using Delphi?, it is as easy as:

    try
      CreateOleObject('Msxml2.DOMDocument.4.0')
      MsgBox('Installed', mbInformation, MB_OK);
    except
      MsgBox('not installed', mbInformation, MB_OK);
    end;
    

    Though based on MSXML on Wikipedia, there's no version of Windows that can run the latest version of Inno Setup that also won't have MSXML 6.0 built-in. So I do not think you need to test it at all, and just go for Msxml2.DOMDocument.6.0.


    Your follow-up question: How can Microsoft XML Parser 4.0 be installed from Inno Setup?