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/
That is a protocol handler.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With