tapping into shell output string

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.
 
T

TC

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
 
J

jonefer

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





.
 

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