Reputation: 1489
I am wondering if there is a way to launch on windows locally stored executable (with arguments) from web browser (not on localhost). Something equivalent to .net:
Process.Start("\\path\to\exe\foo.exe", arg1, arg2,..).WaitForExit()
Hopefully generic way to use in any of major browsers.
Upvotes: 2
Views: 6376
Reputation: 73
As mentioned by Pavel, you cannot execute the code directly. Either you need to run something like node.js or you could have a local server like xampp installed. This will let you run PHP, which in turn would call the DOS /CLI commands to execute the local executable.
Upvotes: 1
Reputation: 336
Browsers do not have this feature. Otherwise, anyone could run malicious code on users' computers. Such an opportunity is only for local instruments like Electron or Node.js, where JS process has bindings to a local file system.
Upvotes: 4