You can make background app, and do something like this on the background app
Close another app
using (Process process = Process.Start("resmon.exe")) {
Console.WriteLine("Waiting 1 seconds before terminating" +
" .exe.");
Thread.Sleep(1000);
Console.WriteLine("Terminating with CloseMainWindow.");
if(process != null)
if (!process.CloseMainWindow()) {
Console.WriteLine("CloseMainWindow returned false - " +
" terminating with Kill.");
process.Kill();
} else {
if (!process.WaitForExit(2000)) {
Console.WriteLine("CloseMainWindow failed to" +
" terminate - terminating with Kill.");
process.Kill();
}
}
}