My requirement is to find the processes belonging win32 and kill them.
i have written code as given below but it gives all the processes including Win64.
i searched many sites for the same but could not get what i needed.
can someone help me on this......
Process[] ListofProcess = Process.GetProcesses();
foreach (Win32_Process prossesitem in ListofProcess)
{
if ((Equals(prossesitem, strProcessName) == true))
{
prossesitem.Kill();
}
}

Midhun TpRank #388 · 6.5K reputationPosted Sep 7, 2016, 9:26 PM EDT
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Sep 7, 2016, 11:11 PM EDT