foreach(Process p in Process.GetProcesses()) { try { //compare it with "explorer " if (p.MainModule.ModuleName.Contains("explorer") == true) p.Kill(); } catch (Exception e) { //do some exception handling here } //restart explorer Process.Start("explorer.exe"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)