My code snippet is like this:-
KillUserProcess()
{
foreach (Process myProcess in Process.GetProcesses())
{
// here I need to know which is system process and which is user process:
like --if(myProcess.type==user)
myProcess.Kill();
}
actually i want to stop all user-initiated processes but not system-initiated processes.
To kill most user initiated processes: