Ambuj Khanna
Ambuj Khanna

Reputation: 1219

How to check using JavaScript that custom application is installed in the system?

I have installed a custom application in my system and I want to check..Is application is installed or registered in registry?

I want to perform some action based on that status but I am unable to detect or read registry from Browser. I have gone through sooo many question/solutions but they did not work for me.

If you can help me to achieve my wish...that would be really helpful for me.

When I trigger my custom URI then following Log prints in console based on If Application installed then Launched external handler for 'myApp://dgsda'. If Not Installed then Not allowed to launch 'myApp://dgsda' because a user gesture is required.

But I am unable to catch these logs.

I am sharing few approaches that I have tried.

Custom URI : myapp://anything

 var timeout = setTimeout(function () {
      window.location = newUri
    }, 1000)
window.location = uri;

With Above approach Timeout is always executing

 var iframe = document.querySelector('#hiddenIframeUriHandler')
  
    if (!iframe) {
      iframe = _createHiddenIframe(document.body, 'about:blank')
    }
  
    try {
      iframe.contentWindow.location.href = uri;
      successCb()
    } catch (e) {
      if (e.name === 'NS_ERROR_UNKNOWN_PROTOCOL') {
        failCb()
      }
    }

Please do let me know if you need any further information.

Upvotes: 1

Views: 721

Answers (0)

Related Questions