A
A
Andrey Sokolovsky2017-11-22 17:42:37
JavaScript
Andrey Sokolovsky, 2017-11-22 17:42:37

How to execute bat file from Javascript?

How to execute bat file from Javascript?
Found this solution

WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("upload.bat");

but it is no longer supported.
Maybe there are some libraries? What do you recommend?
UPD:/ the task is worth it: upload a file without PHP through a regular html form. But you need to send this form somewhere. Java is installed on the client server (never worked with it before).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2017-11-22
@ansk11

Forget, no modern browser will give JS access to the user's machine. Except through vulnerabilities in the system :)

K
Konstantin Kitmanov, 2017-11-22
@k12th

It won't work from a browser. From node.js -- https://docs.nodejs.org/dist/latest-v8.x/docs/api/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question