How to determine if the machine has Microsoft Core XML Services (MSXML) 6.0 installed?

Posted on 2007-08-07
Last Modified: 2013-12-03
How to use C/C++ to determine if the current machine with Microsoft Core XML Services (MSXML) 6.0 installed or not.
Question by:sunsa
    LVL 86

    Expert Comment

    See ("Determine the Version of MSXML Parser Installed on a Computer")
    LVL 1

    Accepted Solution


    I believe you are looking for a programmatic way to discover if the machine your program is running on supports msxml 6.0. lists the GUIDs and ProgIDs for the various MSXML 6.0 components.

    Since Microsoft removed version-independent GUIDs and ProgIDs  in MSXML 4.0 and above you can just do a simple registry key lookup for a MSXML 6.0 component GUID.

    For example:
    {88d96a05-f192-11d4-a65f-0040963251e5} is the GUID for the DOMDocument version 6.0

    I could use that knowledge to query the key in the registry. If it exists then machine supports MSXML 6.0.
    HKEY hkey;
    retVal = RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("CLSID\\{88d96a05-f192-11d4-a65f-0040963251e5})",0,KEY_QUERY_VALUE,&hkey);
    if (retVal != ERROR_SUCCESS) return false.

    Should be noted that you should code some error checking and possibly contain the code within a try catch block

    Good Luck

    LVL 1

    Expert Comment

    Let me clarify my answer. I posted the wrong link. is the link guids and progids.  is a link to example code on how to discover if msxml 4.0 is installed.

    Good Luck

    Author Comment

    Thanks for your feedback, I will take a try and get back to you.
    LVL 86

    Expert Comment

    Thank you! ;o)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now