公司里有一个很好用的exe,不过不清楚是不是保密的,不敢发出来,而官方公布的那个又比较老土,只好自己写了……

把以下代码保存为js文件,然后双击即可。如果对应的msxmlx.dll已经注册,会显示安装路径,否则显示Not Found.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
var shell = WScript.CreateObject("WScript.Shell");
function GetPath(key){
    try{
        return shell.ExpandEnvironmentStrings(shell.RegRead("HKCR\\CLSID\\"+key+"\\InProcServer32\\"));
    }
    catch(e){}
    return "Not Found";
}
var result = "";
result += "MSXML3: " + GetPath("{F5078F32-C551-11D3-89B9-0000F81FE221}") + "\n";
result += "MSXML4: " + GetPath("{88D969C0-F192-11D4-A65F-0040963251E5}") + "\n";
result += "MSXML5: " + GetPath("{88D969E5-F192-11D4-A65F-0040963251E5}") + "\n";
result += "MSXML6: " + GetPath("{88d96a05-f192-11d4-a65f-0040963251e5}") + "\n";
WScript.Echo(result);

您还可能感兴趣的日志:

  1. 在C语言中使用MSXML
  2. 在命令行中以管理员权限启用应用程序
  3. 经典面试题 之 查字典

  One Response to “检测本机安装的MSXML的版本的方法”

  1. so cool,试了一下,很神奇,谢谢分享!致敬!

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
© 2004 - 2011 Leona+Suffusion theme by Sayontan Sinha