从Web应用程序 - 我们如何检查我们的Windows桌面应用程序是否已安装?即使是版本信息,我们如何才能获得它? [英] From a web application - how can we check our windows desktop application is already installed or not? Even the version information, how we can get it?

查看:180
本文介绍了从Web应用程序 - 我们如何检查我们的Windows桌面应用程序是否已安装?即使是版本信息,我们如何才能获得它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Web应用程序和一个Windows桌面应用程序,它们都通过Web套接字连接。



然而,当我们使用Web应用程序时,我们有检查桌面应用程序是否已安装。

如果未安装(或)旧版本的桌面应用程序,我们需要相应地安装/更新它。



我的尝试:



现在面临的挑战是,我们如何识别桌面应用程序是否已安装。

一种方法是在浏览器缓存上存储信息。但我们有以下问题:

- >用户可以清除浏览器缓存。

- >从同一产品的多个URL,如果我们使用,它将具有不同的浏览器缓存。



•目前,我们正在使用自定义URI方法来启动应用程序。 (使用浏览器缓存)



注意:我们主要针对Chrome和Firefox。而且我们也没有管理员权限来安装桌面应用程序。





你们能帮我们找到合适的解决方案吗? ?

We have a web application and a windows desktop application, where both are connected via web socket.

And when ever, we use the web application, we have to check the desktop app is already installed or not.
In case if desktop app is not installed (or) it is of older version, we need to install/update it accordingly.

What I have tried:

Now the challenge is, how we can identify that desktop app is already installed or not.
One way is to store information on browser cache. But we have following issues:
-> User can clear browser cache.
-> From multiple URLS of same product, if we use, it will have different browser cache.

• Currently, We are using Custom URI method to launch the application. (using browser cache)

NOTE: We are mainly targeting On Chrome and Firefox. And also we won't have admin privileges to install desktop app.


Can you guys, please help us in finding the right solution?

推荐答案

单独使用Javascript无法完成。在浏览器中运行的代码在严格保护的沙箱中运行,该沙箱无法访问系统资源,包括已安装的应用程序列表。在客户端暴露这些信息会带来相当大的安全风险。



有一种解决方法。 Javascript只能与Web服务器通信。没有任何迹象表明Web服务器不能是客户端计算机的本地服务器。



您必须在计算机上编写并安装可执行文件才能执行此操作。通常,此可执行文件是Windows服务应用程序,它是一种代理,可以收集所需信息并通过服务中内置的小型Web服务器公开它。然后,Javascript代码可以从服务中的Web服务器获取数据,以获取数据并将其发送回主Web服务器。
Using Javascript alone it can't be done. Code running in the browser runs in a tightly secured sandbox that has no acccess to system resources, including the list of installed applications. Exposing such information would be a considerable security risk on the client side.

There is a way around this. Javascript can only talk to web servers. There is nothing that says the web server cannot be local to the client machine.

You would have to write and install an executable on the machine in order to do this. Typically, this executable would be a Windows service application that is an agent that gathers the information you want and exposes it through a small web server built into the service. The Javascript code can then get the data from the web server in your service to get the data and send it back to your main web server.


这篇关于从Web应用程序 - 我们如何检查我们的Windows桌面应用程序是否已安装?即使是版本信息,我们如何才能获得它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆