Run processes after each other

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I want to run 4 processes, but one after each other.
Now I have a program that runs the 4 processes at the same time.
How can I do that?

thanks a lot!

Filip


MY CODE:

// Group file
ProcessScripts = new Process();
ProcessScripts.StartInfo.UseShellExecute = false;
ProcessScripts.StartInfo.RedirectStandardOutput = true;
ProcessScripts.StartInfo.WorkingDirectory = "L:\\GDLO\\scripts\\";
ProcessScripts.StartInfo.FileName = "perl.exe";
ProcessScripts.StartInfo.Arguments = "transaction-group-lessius.pl";
result = ProcessScripts.Start();

// Program membership file
ProcessScripts = new Process();
ProcessScripts.StartInfo.UseShellExecute = false;
ProcessScripts.StartInfo.RedirectStandardOutput = true;
ProcessScripts.StartInfo.WorkingDirectory = "L:\\GDLO\\scripts\\";
ProcessScripts.StartInfo.FileName = "perl.exe";
ProcessScripts.StartInfo.Arguments = "transaction-membership-lessius.pl p";
result = ProcessScripts.Start();

// ....
 
=?Utf-8?B?RmlsaXAgRGUgQmFja2Vy?= said:
I want to run 4 processes, but one after each other.
Now I have a program that runs the 4 processes at the same time.
How can I do that?

result = ProcessScripts.Start();

Insert an:
<code>
ProcessScripts.WaitForExit();
</code>

after each process start!

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Back
Top