Click here to Skip to main content
16,020,669 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 11-Aug-17 5:11am

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900