如何从asp.net web应用程序检查应用程序是否安装在pc中

How to check if an application installed or not in pc from asp.net web application

本文关键字:应用程序 安装 是否 pc 检查 asp net web      更新时间:2023-09-26

我需要从我的web应用程序中打开一个windows应用程序,我知道如何做到这一点。问题是我无法确定应用程序是否已安装。目前我正在使用以下代码进行检查,

    var win= window.open(url, 'send', 'width=100,height=100,top=1,left=1,resizable=yes', '1');
     if(win==null || win.closed==true)
       {
        alert("Application not installed.");
       }

它工作正常,但问题是,如果弹出窗口被阻止,那么我得到空值,那么即使安装了应用程序,也会出现警报。因此,有没有任何方法可以从web应用程序检查应用程序是否安装在pc中

试试这个:

var win= window.open(url, 'send', 'width=100,height=100,top=1,left=1,resizable=yes', '1');           
if(!win|| win.closed || typeof win.closed=='undefined') 
{ 
 //POPUP BLOCKED
 return;
}
if(win==null || win.closed==true)
{
    alert("Application not installed.");
}
相关文章: