Friday, 23 August 2013

C# - Force one application to close when a different application has closed, then close itself

C# - Force one application to close when a different application has
closed, then close itself

So, I'm writing a program, here's the start of it!
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
System.Diagnostics.Process.Start(@"C:\\Windows\\ehome\\ehshell.exe");
System.Diagnostics.Process.Start(@"E:\\Xpadder\\WMC.xpaddercontroller");
}
}
}
All it does is open the two files, What I want it to do is also wait until
it detects when ehshell.exe stops running and then force another program
(in this case xpadder) to end aswell
I've had a look for cose for doing this, but I'm not the best at C# and
not 100% sure what I'm looking for!

No comments:

Post a Comment