OK, i have finally managed to find out how to do this...
var Shell = new ActiveXObject("WScript.shell");
var strCMD = "put your command here";
var oExec = Shell.Exec(strCMD);
var oExecOut = oExec.StdOut;
var input = "";
input = oExecOut.ReadAll();in the end it turned out to be quite simple... i just didn't understand WScript very well... i do now!
Lee A Newson