0

I want to redirect from a website to a desktop application. In addition, I want the website to show an alert and when I click "open", it will open the desired application on my desktop.

This is an example alert when signing into GitHub from VS Code. I want to do the exact same thing, just with a different application.

Thanks for helping!

enter image description here

  • 1
    That's just a link that uses UriSchemes (https://www.w3.org/wiki/UriSchemes) like `mailto` or `tel`. In the picture, you can see `vscode` is being used. Also, the popup automatically shows when the browser tries to open an application. So you don't need to code it. – Engin Nov 20 '21 at 13:36

1 Answers1

1

First thing you need to know is that this works only for desktop apps built with Electron. Secondly, inside such an app, at bootstrap time the coders needed to add something like this:

//Register Protocol
app.setAsDefaultProtocolClient("vscode");

Which registers the electron application with that protocol, so that the app will be the one reacting when you try to open it from the browser You can read more about it in the docs here or in this article here.

Mihai Paraschivescu
  • 1,261
  • 13
  • 12