Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wscript echo
#1
Here is the scenario. I have a scheduler (Control-M) which runs exe/bat/scripts, etc. and captures calls to console "echo"

If I run this "cscript /nologo msg.vbs" where msg.vbs contains just "WScript.Echo "OK"". Output in the job run of the scheduler contains "OK"

I have tried everything (cputs/cprintf/Windows Stdout), even tried "Run" and did the above, but the output just does not come.

Any clues ?

I am testing QM to create a FTP Client for automated file transfers with error handling. It will eventually be used company-wide but this really needs to work somehow.
IBM Mainframe Expert who Plays with QM a LOT !
#2
RunConsole or RunConsole2.

Macro
Code:
Copy      Help
str _file text cl echo echo2
_file.expandpath("$desktop$\msg.vbs")
text=
;WScript.Echo "OK"
text.setfile(_file)

cl.format("/nologo %s" _file)
RunConsole "cscript" cl echo
out echo

cl.format("cscript /nologo %s" _file)
RunConsole2 cl echo2
out echo2
#3
Its very wierd. The output just does not come. Control-M agent runs the exe ( I checked by creating a file in it ). But any and all kind of output (including out) just disappears. Nothing comes anywhere !
IBM Mainframe Expert who Plays with QM a LOT !
#4
That code worked here. Tested only on Vista.


Forum Jump:


Users browsing this thread: 1 Guest(s)