-2

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.

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?

  • Web applications are not supposed to interact with operation system. I don't think you can find a solution for it because for browser to be able to access applications or any kind of operation system related information is a high security risk. – serdar.sanri Aug 11 '17 at 14:47
  • See https://www.w3.org/TR/2011/WD-html5-20110525/timers.html#custom-handlers – guest271314 Aug 11 '17 at 15:03
  • This is completely wrong, you can't use web app to inspect anything on anyone's PC, if it were possible then no one would even use browsers. Your logic is absolutely incorrect here, instead of having web app check for existence of desktop app, the desktop app should report in as connected if it's started. When it starts, you said it uses web socket connection - simply notify your web app via web socket that desktop one is running at the target computer. This is wrong on many levels but there you go, that's your solution. – Mjh Aug 11 '17 at 15:18

1 Answers1

0

Whenever you serve the installer to the client, make them authenticate themselves.

e.g to install the desktop app, the user must get it from somewhere. lets say that you have an app download url: www.yourdesktopapp.com/download

now, on that url, you can first, ask a user to log in( get his user id ) and , before sending them the installer file, you will save the

user id with the information of the file you sent them into a database.

This way you can more or less know who has installed the desktop apps, when they did it, and if they need to upgrade.

Quick Edit based on your comment:

Well, i don't know what the application is about, but perhaps you should the ask user to log in before allowing to download...or add an authentication step into the application itself, so that whenever user starts up the app, it would send app version + user id to your server.

=== OR ===

Alternatively you can just give the user the option to download the app regardless if they already have it. If they have it, they will ignore the download button, if not, they can download. As for updating the app, leave that to the app itself. Its not the website that should update your app, but the app should check for updates whenever it is started.

e.g you can add a simple query into your app, that checks for the latest version available, and compares it to current version. If there is a newer version available, either download it on the background, or navigate users browser onto a version update page.

Rainer Plumer
  • 3,693
  • 2
  • 24
  • 42
  • thanks for your reply.. in our application user can join through a link where he didn't need any credential to access it. – Nibin Thomas Aug 14 '17 at 07:14
  • "This way you can more or less know who has installed the desktop apps" — But not which computers they installed them on (or if they are using one of those computers right now) – Quentin Aug 14 '17 at 10:49