How to check for a protocol existence without executing it using Angular?

  angular, browser, javascript, registry, windows

Use case:

In order to install a custom scheme (AKA custom URL protocol) & execute a custom binary file, I need to verify its existence first in the windows registry.

Available solutions:

checkProtocolExistence() {
      // uri: Custom protocol url to check for
      () => {
        // failCb: Callback function which gets called when custom protocol not found.
        console.log('Protocol not found.');
      () => {
        // successCb: Callback function which gets called when custom protocol is found.
        console.log('Protocol found and opened the file successfully.');
      // timeout: (default: 2000). It waits for timeout unless it calls failCb.

Problem statement:

  • The proposed packages successfully verified the custom URL protocol existence, but in order to achieve the callback, it must be executed first.
  • After executing the custom URL protocol, a browser alert notification shows up.


  • Which in my case, I don’t want the user to see the alert notification (just for the verification).


  • Is there a possible way to verify a custom protocol’s existence in the Windows registry without executing it?
  • Is there a possible way to prevent the alert notification after executing the custom protocol?
  • Is there a possible way to execute a Powershell command and read its callback from my web app?

Dev environment

  • Angular v7.2.16
  • Node v12.16.2
  • NPM v6.9.0

Source: Windows Questions