
WshShell.Run vs WshShell.Exec
Quote:
>> .... Also, I read some past messages in this newsgroup
>> regarding problems using WshShell.Exec with programs that generate a
>> lot of text to StdErr. Could this be the problem?
> It certainly could be and probably is...
> Here's the WshShell.Exec template code I use to ensure that all output
is
> captured and the Exec'd process doesn't block on a full stdout buffer...
Hmm, after thinking about it a little more I believe I know what the
problem is... Previously, I was just waiting until WshScriptExec.Status
<> 0, and then doing a .StdErr.ReadAll. I guess I need to be pulling it
out of the buffer as it goes so that the buffer does not get full. I
think that is what is happening... the program is waiting for the buffer
to be emptied so that it can add additional text to the buffer.
Do you know where to find documentation about the max size of the buffers?
I tried looking for some documentation about the NT 4 command shell but I
couldn't locate it on MSDN.
Brian Baker
--
Microsoft MVP -- ASP / ASP.NET
Please post responses to the group