I need to shut down a C# program of mine from another C# program of mine. Here's the ode I use to shut down proceses:
System.Diagnostics.Process process = Process.GetProcessesByName( processName );
if ( process.Length > 0 )
the problem is that in order to protect the program from being shut down by a casual operator mistake, I require a password. But when shutting down automatically, there is no opportunity for a password.
How would I terminate it and have it "know" to bypass the code I included to check for a password?
Thanks for the help,