DEV Community

Discussion on: Writing OS-specific code in Electron

noahlaux profile image
Noah Laux

and kudos on keeping your senses during the troll behavior of @tuxOr!

Thread Thread
simonhaisz profile image
simonhaisz

@smuschel if your talking about the custom protocol my-app://some-path support, technically you don't need Electron to use it. You just need to add a registry setting that points to your exe which can be built on anything. So if you only care about Windows and not Mac then you do have other options, though they involve vendor lock-in.

I know Electron can do that for you but I recommend you have the installer do it instead so that the uninstall can remove the settings along with your program. The built in Electron registering adds a bunch of duplicate settings on different paths for reasons I don't understand and that doesn't follow MS documentation. And it doesn't provide an API to remove them as far as I know.

And I say this as another long term Java Web Start developer moving to new options thanks to Oracle 😢

Thread Thread
smuschel profile image
smuschel

Thanks for pointing that out - I'll have to read up on custom protocol handlers. But the overall story is long and complicated (need to do more unspeakable things without user interaction... lost that battle more than a decade ago).