Re: Exec vs. Run

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I see.  Thanks for the info!

-Dave

T Lavedas wrote:
Yes, there is a reason the app hangs; one or both of the I/O buffers
(StdOut & StdErr) is filling.  They must be flushed continuously to
keep this from happening.  I wrote a script example a long time ago
that explins this and shows a work around.  See this thread:

http://groups.google.com/group/microsoft.public.scripting.wsh/browse_frm/thread/6365b4f59adbf276/e4e6612fc0d9fea1#e4e6612fc0d9fea1

Tom Lavedas
===========

D. Malaguti wrote:

I'm pretty new to scripting in general and I'm wondering if someone can
help me understand why something doesn't work.

I've got a script (written in JScript) that launches 7-zip
(http://www.7-zip.org), archives a bunch of files, then copies the
archive to a removable disk.  I originally wrote it using the Exec
method to launch 7-zip.  This worked great when I tested it, but in the
real world I discovered that 7-zip would launch, the archive file would
grow to exactly 2MB, and then 7-zip would appear to hang.  I tried
re-writing it using the Run method and it works fine (actually even
better for my purposes).

Is there a logical reason why Exec would cause 7-zip to hit this 2MB
limit, or is it just some peculiarity of 7-zip itself?

-D.


.