tapping into shell output string

  • Thread starter Thread starter jonefer
  • Start date Start date
J

jonefer

This may be a round about way to ask a question, but
Is there a way to tap into the feedback output string of a
shell window coming from a batch file called from VB so
that you could completely hide the console window and show
the string output in a messagebox instead?

Additionally, I'm using the ExecCommand routine described
WHEN A SHELLED PROCESS ENDS to prevent processes from
running into each other.

I'm open to a VB6 solution for this if there is one
instead, but prefer an Access solution.
 
Maybe have the batch file send its output to disk, using the output
redirection operator (>) :

the_commands.bat > c:\the_output.txt

Then open the output file using the VBA Open statement, read the lines using
Line Input$, copy them into a textbox, then delete the temporary output
file.

Obviously you might want to use the windows temp folder, instead of the hard
disk root directory, for the temp file.

HTH,
TC
 
Sounds like it's worth a try..
Thanks.
-----Original Message-----
Maybe have the batch file send its output to disk, using the output
redirection operator (>) :

the_commands.bat > c:\the_output.txt

Then open the output file using the VBA Open statement, read the lines using
Line Input$, copy them into a textbox, then delete the temporary output
file.

Obviously you might want to use the windows temp folder, instead of the hard
disk root directory, for the temp file.

HTH,
TC





.
 
Back
Top