Quote:
Originally Posted by Speedz
One of my biggest annoyances I have that I am researching is that when the GUI is closed, all but the Shell stay running and hidden (have to be closed in task manager if you want to restart a server again).
|
This should work for you?
Code:
foreach (Process p in Process.GetProcessesByName("world")) {
p.Kill();
p.WaitForExit();
}
foreach (Process p in Process.GetProcessesByName("eqlaunch")) {
p.Kill();
p.WaitForExit();
}
foreach (Process p in Process.GetProcessesByName("zone")) {
p.Kill();
p.WaitForExit();
}
foreach (Process p in Process.GetProcessesByName("Login")) {
p.Kill();
p.WaitForExit();
}
System.Environment.Exit(0);
}