First, a bit of pseudo-ish code:
So I'm using something like the above to execute an external command line program several hundred times. It works great, except that it bogs the entire system down while it's running. Switching window style to .Normal shows me that upwards of 30 or 40 different instances of the console are happening at once. I found some info on the WaitForExit method, but it's unavailable to console applications.
Is there a way to accomplish this in a console application? I don't mind the extra wait time it would incur just as long as the computer is still usable while it's going. Placing an arbitrary pause after each Process.Start(p) is less than ideal since each execution of the external process has different arguments and will take differing amounts of time to complete.
Thanks
VB.NET:
Loop Start
//Some logic here. Removed for brevity
Dim p As New ProcessStartInfo
p.FileName = _NAME
p.Arguments = _ARGS
p.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(p)
Loop End
So I'm using something like the above to execute an external command line program several hundred times. It works great, except that it bogs the entire system down while it's running. Switching window style to .Normal shows me that upwards of 30 or 40 different instances of the console are happening at once. I found some info on the WaitForExit method, but it's unavailable to console applications.
Is there a way to accomplish this in a console application? I don't mind the extra wait time it would incur just as long as the computer is still usable while it's going. Placing an arbitrary pause after each Process.Start(p) is less than ideal since each execution of the external process has different arguments and will take differing amounts of time to complete.
Thanks
Last edited: