hi all,
i'm trying to write an hta application that uses WSH. i want to run serious of
commands/batch files in one single cmd console invoked by my application.
this is part of the code:
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("cmd",2); //create cmd console minimized
WshShell.AppActivate("C:\\WINNT\\System32\\cmd.exe");
WshShell.SendKeys ("dir~"); //run 'dir' command and 'enter'
the problem is that multiple cmd consoles are created and not one...
can any of you help???
thanks,
amstel
i'm trying to write an hta application that uses WSH. i want to run serious of
commands/batch files in one single cmd console invoked by my application.
this is part of the code:
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("cmd",2); //create cmd console minimized
WshShell.AppActivate("C:\\WINNT\\System32\\cmd.exe");
WshShell.SendKeys ("dir~"); //run 'dir' command and 'enter'
the problem is that multiple cmd consoles are created and not one...
can any of you help???
thanks,
amstel