How can I determine if MSXML6 is installed on a system using delphi?
1 answer
you can check if CLSID exists in registry using CLSIDFromProgID function , for MSXML CLSID -Msxml2.DOMDocument.6.0
Check this example app
uses
ActiveX,
SysUtils;
{
Msxml2.DOMDocument.2.6
Msxml2.DOMDocument.3.0
Msxml2.DOMDocument.4.0
Msxml2.DOMDocument.5.0
Msxml2.DOMDocument.6.0
}
var
clsid: TCLSID;
begin
try
if Succeeded(CLSIDFromProgID('Msxml2.DOMDocument.6.0', clsid)) then
Writeln('MSXML 6.0 Installed')
else
Writeln('MSXML 6.0 Not Installed');
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
Readln;
end.
+6
source to share