0

I am currently developing a web application. The application needs to open other applications installed on the computer. The end user will use Windows and Internet Explorer, the application does not have to support other web browsers.

Some people told me that I should use "URL scheme" with javascript, but can not find any example.

I found a possible solution but uses activex, How to launch an EXE from Web page (asp.net)

Community
  • 1
  • 1
choqueiro
  • 1
  • 1
  • possible duplicate of [How to launch an EXE from Web page (asp.net)](http://stackoverflow.com/questions/916925/how-to-launch-an-exe-from-web-page-asp-net) – smorgan Nov 15 '14 at 23:33
  • Your question is exactly the same as the question you referenced; just asking it again isn't a good way to get clarification. – smorgan Nov 15 '14 at 23:34

2 Answers2

0

It's not so easy. You need to develop your own plugin for each web browser. Here is some helpfull links NPAPI, PPAPI, and IE BHO.

Another approach is to use ClickOnce application as launcher.

Ivan
  • 769
  • 5
  • 17
  • The system will be used only in internet explorer and windows. There is no option to call any operating system resource? – choqueiro Nov 13 '14 at 09:36
  • If this is Internet explorer only - may be [Direct Launch](http://msdn.microsoft.com/en-us/library/ie/jj215788(v=vs.85).aspx) technology may help you. There are is no safe way to implement accessing local resources, from e.g. javascript. I'd prefer ClickOnce, since it is clear and direct way to ask user to launch your app. – Ivan Nov 13 '14 at 09:40
0

this is another possible solution.

Check if URL scheme is supported in javascript

HTML:

<a class="uri-link" data-uri="qobuzapp://" href="#">URI</a>​

Javascript (using jQuery here):

var windowHasFocus;

$(window).focus(function() {
  windowHasFocus = true;
}).blur(function() {
  windowHasFocus = false;
});

function goToUri(uri) {
  document.location = uri;
  setTimeout(function(){
    if(windowHasFocus) {
      if(confirm('You do not seem to have Qobuz installed, do you want to go download it now?')){
        document.location = 'http://www.qobuz.com';
      }
    }
  }, 100);
}

$('a').on('click', function(){ 
  goToUri($(this).data('uri')); 
});​
Community
  • 1
  • 1
choqueiro
  • 1
  • 1