Custom Protocol/deep link (myapp://something...) - Windows

I’ve been trying to associate a custom protocol in Windows with my app such that I can direct a user to this link and cause my app to open.

I know this is possible via custom protocols, but the build configuration does not seem to work with this.

However, it works fine in macOS; i.e. I know it works in the build, but Windows doesn’t seem to care - I don’t think it’s getting registered by the installer correctly.

I’m using electron-builder for the build process. Their documentation sucks (it’s a huge mess which I would gladly contribute to, but first I need to know how their API works, which is ironic because it’s due to the huge mess that I’m confused) so it’s not clear what I’m missing here, and most of this is undocumented. However, it seems electron-packager uses a similar/same method as do other builders so I’m not sure this is relevant.

I have this in my package.json:

"build": {
    "appId": "",
    "productName": "AppName",
    "copyright": "Copyright © 2020 Some Company, Inc.",
    "protocols": [
        "name": "AppNameHere",
        "schemes": [
    "files": [
    "directories": {
      "output": "./build"

I’ve seen suggestions on various build configs using/not using the NSIS config, using/not using the NSIS script; some people seem to get it to work without this.