javascriptelectrondeep-linkingelectron-builderurl-scheme

url scheme: open windows application on request [Electron]


i have a php website and i have an electron based desktop application i want to be able to open this application which i made it when the client hit the button on my website, how can i do that?

for example, let's say i have a chatting website and a chatting application and the user likes to use the app instead of the website so after he installs my app on his windows machine and then go to the website to click the button i want the app to open it self! how can i achieve that please ?

I would like add a minor query that lets assume if application is installed it is opening the installed application, but what if application is not installed, it is throwing error on my side like "Module is not found" '

has any one faced such kind of issue for better clarification I'm adding screen shot here.

enter image description here

I also got many times below dialog as well, I'm attaching the screen for the same as well.

enter image description here


Solution

  • Electron provides the app.setAsDefaultProtocolClient API specifically for that purpose.