Remote Shell Call

L

Lee Newson

Hi

I have a form that is required to gather some information programmatically
from one of our inhouse systems. The only hook-ins to this system are via
Remote Shell calls.

I am using JScript to do any custom coding for the form and i have
successfully managed to create the shell object and run the command, however
i do not know how i can get the data that is returned...

When i run the command in a command window the data is returned on the next
line, but i cannot seem to find a way to get this data when running it via
JScript.

Has anyone tried this or does anyone know how this can be done??

Cheers for any and all help, it is greatly appreciated.

Regards

Lee
 
L

Lee Newson

Done it!!

In case anyone needs to know i used the following

var Shell = new ActiveXObject("WScript.shell");
var strCMD = "your cmd";
var oExec = Shell.Exec(strCMD);
var oExecOut = oExec.StdOut;

var input = "";
input = oExecOut.ReadAll();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top