call an .exe in javaScript or html [closed]

3

I'm migrating a desktop system to the web, we already have a great part ready, I would like to upload it and call what is not yet ready for the application by the browser, I would like a help, in the following question what is the best way to do this , using angular, pure javascript, html?

    
asked by anonymous 30.05.2017 / 22:02

2 answers

3

You can implement a Handler URI.

Create a .REG file to be run, with the appropriate permissions, on Windows machines, with content similar to this:

REGEDIT4

[HKEY_CLASSES_ROOT\SuaAplicacao]
@="URL:Protocolo SuaAplicacao"
"SuaAplicacaoHandler"=""

[HKEY_CLASSES_ROOT\SuaAplicacao\DefaultIcon]
@="\"C:\Program Files\SuaAplicacao\SuaAplicacao.exe\""

[HKEY_CLASSES_ROOT\SuaAplicacao\shell]

[HKEY_CLASSES_ROOT\SuaAplicacao\shell\open]

[HKEY_CLASSES_ROOT\SuaAplicacao\shell\open\command]
@="\"C:\Program Files\SuaAplicacao\SuaAplicacao.exe\" \"%1\" \"%2\" \"%3\" \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\""

After that, use URLs in the following format:

SuaAplicacaoHandler://qualquerDadoQueDesejarPassar

For your Windows application to be invoked, and the qualquerDadoQueDesejarPassar parameter received by the application.

    
31.05.2017 / 15:19
0

You can not run browser executable files. For security reasons. Since much of the work has already been done on your desktop application. It is advised to implement the concepts of flags in the desktop application (passage of parameters) and then consume this with some script functions to make the resources and processes available through a REST API. So you can use it in your web application.

    
31.05.2017 / 13:48