Post by Paul RandallPost by Tom LavedasIl giorno Sun, 30 Mar 2008 18:10:14 +0200, Massi
{snip}
Post by Paul RandallPost by Tom LavedasSurprisingly, the developers made these fixed length and fairly small
(8 kbytes). I mentioned Winzip as an application that I have seen
cause this problem because it uses StdErr to show progress. Here is a
http://www.google.com/groups?threadm=034a01c3b2d7%248a431230%24a50128...
Thanks for the link. Is the WZZip.exe a standalone executable that
can be run on a system without installing the Winzip package? I don't
currently have Winzip installed because I don't know what hooks, like
context menus, it installs and may not uninstall if I don't like it.
The link also talked about the 8KB buffer length. That 8K number
certainly doesn't apply to StdOut on my WXP system.
Set oWS = WScript.CreateObject("WScript.Shell")
Set oExec = oWS.exec("%comspec% /c Dir /a /s c:\*.*")
sResults = oExec.stdOut.ReadAll
MsgBox Len(sResults) & vbCrLf & sResults
WScript.Quit
19979638
Volume in drive C is PP01
Volume Serial Number is 3E13-1C01
19979638 is way bigger than an 8K buffer would allow -- maybe 8K is a
W98 or a vintage WScript.Shell limitation. I watched the mem usage in
task manager grow to about 42 megabytes while the dir command in the
script above was running. When the message box showed up, the memory
usage jumped to about 83 megabytes.
-Paul Randall
It's been years since I played with this. AFAIK, Wzzip.exe is only
downloadable to registered/licensed users of Winzip. I don't know if
it is loadable without the Winzip install. I suspect not - that it is
just a command line wrapper for the Winzip dlls - but I have never
considered it before.
As far as the apparent lack of a buffer restriction, all I can say is
it was there once and as I said earlier, its been a while since I
considered the question.
Still, a ReadAll would still be a problematic approach, I think,
because a run away application would still be out of reach for the
calling application to intercede.
At this point, we have wondered more than a bit off topic. Fun, but
more time than I can spare at the moment.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/