using System.Diagnostics; Process me = Process.GetCurrentProcess(); foreach (Process p in Process.GetProcesses()) { if (P.Id != me.Id) // CHANGE me.Id to explorer PID P.CloseMainWindow(); // Sends WM_CLOSE; less gentle methods available too }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)