<script> 
try 

  var pdftest=new ActiveXObject("PDF.PdfCtrl.6"); 

catch(e) 

  if(window.confirm("Acrobat Reader6.0简体中文版没有安装,您要下载安装吗?")) 
  window.open("http://xxxxx/software/AdbeRdr60_chs_full.exe") 

</script> 
可以判断是否按装AdbeRdr60_chs,现在想判断是否按装了AdbeRdr90_zh_CN.exe这个版本,在ActiveXObject("PDF.PdfCtrl.6");怎么改,在注册表中是否能找到路径什么

解决方案 »

  1.   


      var SetFetionPath=function(){
                var FetionPath=prompt("飞信安装路径:","C:\\Program Files\\China Mobile\\Fetion\\Fetion.exe");
                if(FetionPath!= null && FetionPath!="" && FetionPath!="undefined")
                {
                    try
                    {
                        SetCookie("FetionPath",FetionPath);
                        alert("设置路径成功,请重新运行!");
                    }
                    catch(ee)
                    {
                        alert("设置路径失败!");
                    }
                }
            };
            
            var RunFetion = function(){
                var WshShell = new ActiveXObject("WScript.Shell");
                var FetionPath=GetCookie("FetionPath");
                if(FetionPath==null || FetionPath=="")
                {
                    try{                
                        FetionPath  =  WshShell.RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Fetion\\UninstallString");
                    }
                    catch(eee){
                        alert("获取飞信安装路径失败!请手动设置飞信的安装路径!");
                        SetFetionPath();
                        return;
                    }
                }
                if(FetionPath!="" && FetionPath!="undefined")
                { 
                    FetionPath = FetionPath.substr(0, FetionPath.lastIndexOf("\\") + 1);
                    FetionPath += "Fetion.exe";
                }
                FetionPath=FetionPath.replace(/Program Files/i,"Progra~1");
                FetionPath=FetionPath.replace(/China Mobile/i,"ChinaM~1");
                try
                {
                    WshShell.run(FetionPath);
                }
                catch(err)
                {
                    alert("运行失败!请手动设置飞信的安装路径!"+err.description);
                    SetFetionPath();
                }
            };
    给你一段我检测飞信的代码在注册表中应该是可以找到程序的安装路径的