I have an application which depends of the MSXML6, in most of the machines when the application is deployed this package is already installed, but in a few cases the MSXML6 is not installed, The question is how I can check if the MSXML 6 is already installed?
you can check if the CLSID exist in the registry using the CLSIDFromProgID function, for MSXML the CLSID is Msxml2.DOMDocument.6.0
Check this sample 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With