I developed a web application hosted on a Linux server (or Windows for some clients). I use Angular 6 for the frontend and Spring Boot for the Backend.
So each user uses Firefox to connect to the app. So far so good.
However, I have to develop a new feature that allows the user to open a software installed on his own computer (Windows) from my web app ...
So I have to do this on the client side of my app (Angular or Javascript pure) to launch the software.
I know this is forbidden for security reasons except perhaps if we add an exception in the security of FireFox.
I tried the following code, isolated in a javascript file:
function launchDict(nom) {
require(['child_process'], function (child_process) {
//fs and child_process are now loaded
var exec = child_process.exec;
exec('C:\\PuTTY\\putty.exe', function (error, stdOut, stdErr) {
alert("Appel logiciel");
});
})
}
How to do that?
****** Update ****** It seems like javascript way is a "bad way" because of security compliance. And solutions described seem to work only on IE example : Is it possible to run an .exe or .bat file on 'onclick' in HTML