Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How GoToMeeting validate desktop software installed in order to host session

Looking for a Technique where I can install my software on a windows PC and check using javascript that if the software is installed.

If installed launch it. If not installed download it.

The hint I got is to add custom font or mime type and then check it something like this - https://www.samclarke.com/javascript-is-font-available/

like image 281
Sachin Prasad Avatar asked Mar 22 '17 06:03

Sachin Prasad


1 Answers

That is a protocol handler.

How the check works,

It execute a custom schema url. For example.

executing the magnet:// will redirect you to torrent application if installed. Else, redirect you to google. Here, in the place of google, you can use the protocol handler to redirect to the setup file.

From mobile, executing whatsapp:// will Open whatsapp if installed.

Check the below snippet.

Running it will prompt to Open the torrent application.

function utorrent_test(){
  return window.location.href="magnet://";
}
var result=utorrent_test();
console.log(result);

Read more about protocol handler in MDN

Also read in detail here https://html.spec.whatwg.org/multipage/webappapis.html#custom-handlers

like image 180
Sagar V Avatar answered Nov 15 '22 00:11

Sagar V