我有一个依赖于MSXML6的应用程序,在大多数机器上,当应用程序部署时,这个包已经安装了,但在少数情况下MSXML6没有安装,问题是我如何检查MSXML6是否已经安装?
发布于 2012-03-24 04:48:45
您可以使用CLSIDFromProgID函数检查注册表中是否存在CLSID,对于MSXML,CLSID为Msxml2.DOMDocument.6.0
检查此示例应用程序
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.https://stackoverflow.com/questions/9846290
复制相似问题