Run
allows you to set the booleanbWaitOnReturn
flag, which blocks your script until the program returns.On that page, the VBScript sample simply assigns the command to a variable (as you've done with
ShellExecute
). I'm not sure if this works in JavaScript, but it's worth a shot.However, as you know,
ShellExecute
does allow you to store a return value.
Run exe with javascript and get response
-
23-09-2022 - |
سؤال
Here is my code for running exe using javascript. It's working fine. Is there a way for me to know:
- When the exe closed.
- Get a return value from this app.
Also, what is the difference between using ShellExecute & Run?
var sExePath = "c:\\Debug\\WebToCardReader_Test.exe";
var oShell = new ActiveXObject("Shell.Application");
var oExec = oShell.ShellExecute(sExePath, "", "", "open", "1");
المحلول
لا تنتمي إلى StackOverflow