tasks

  • Thread starter Thread starter tim djossou
  • Start date Start date
T

tim djossou

I would like to find all the WINWORD tasks running on my windows 2003 server
and END them. Where can I find how to write such code in c#?

Thanks
 
You can use the GetProcessByName method for the Process class to do this.
Here's an example.

string processName = "winword";
Process[] processByNameList =
Process.GetProcessesByName(processName);
foreach (Process p in processByNameList) {
p.Kill(); }

don't forget to add using System.Diagonistics namespace reference to the top
 
Thanks

Pramod Anchuparayil said:
You can use the GetProcessByName method for the Process class to do this.
Here's an example.

string processName = "winword";
Process[] processByNameList =
Process.GetProcessesByName(processName);
foreach (Process p in processByNameList) {
p.Kill(); }

don't forget to add using System.Diagonistics namespace reference to the
top


tim djossou said:
I would like to find all the WINWORD tasks running on my windows 2003
server and END them. Where can I find how to write such code in c#?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top