Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / June 2007

Tip: Looking for answers? Try searching our database.

tasks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tim djossou - 29 Jun 2007 16:59 GMT
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
Pramod Anchuparayil - 29 Jun 2007 17:26 GMT
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

>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
tim djossou - 30 Jun 2007 09:54 GMT
Thanks

> You can use the GetProcessByName method for the Process class to do this.
> Here's an example.
[quoted text clipped - 12 lines]
>>
>> Thanks
Alex Meleta - 29 Jun 2007 17:27 GMT
Hi,

E.g. foreach (Process process in Process.GetProcessesByName("winword")) process.Kill();

Regards, Alex
http://devkids.blogspot.com

> 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
tim djossou - 30 Jun 2007 09:55 GMT
thanks
> Hi,
>
[quoted text clipped - 8 lines]
>>
>> Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.