Hi
I want to write a piece of code, that will check if a particular service is
running on a particular machine.
Can someone give me a pointer as to which classes would be useful??
Any sample code would be appreciated

Thanks

Re: Checking if certain processes are running, on a certain machine by Michael

Michael
Fri Oct 21 05:11:15 CDT 2005

Hello Paul,

Just a point (u don't have codesnippet)
http://www.windowsitpro.com/Articles/Index.cfm?ArticleID=43569&DisplayTab=Article

U need to use Performance counters

PA> Hi
PA> I want to write a piece of code, that will check if a particular
PA> service is
PA> running on a particular machine.
PA> Can someone give me a pointer as to which classes would be useful??
PA> Any sample code would be appreciated
PA> Thanks
PA>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche



Re: Checking if certain processes are running, on a certain machine by ALI

ALI
Sun Oct 23 06:07:39 CDT 2005

Salam

you cannot get the information about the process running on the remoate PC,
but for that you must have an admin rights

Process[] arrProcess;

arrProcess=Process.GetProcesses(/* C REMOTE COMPUTER NAME*/);

foreach (Process p in arrProcess)

{

if (p.ProcessName==/* REQUIRED PROCESS NAME*/)

{

// do something

}

}


--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com


"Paul Aspinall" <paul@aspy.co.uk> wrote in message
news:9%16f.61267$U9.42865@fe3.news.blueyonder.co.uk...
> Hi
> I want to write a piece of code, that will check if a particular service
> is running on a particular machine.
> Can someone give me a pointer as to which classes would be useful??
> Any sample code would be appreciated
>
> Thanks
>



Re: Checking if certain processes are running, on a certain machine by ALI

ALI
Sun Oct 23 06:06:56 CDT 2005

Salam

you cannot get the information about the process running on the remoate PC,
but for that you must have an admin rights

Process[] arrProcess;

arrProcess=Process.GetProcesses(/* C REMOTE COMPUTER NAME*/);

foreach (Process p in arrProcess)

{

if (p.ProcessName==/* REQUIRED PROCESS NAME*/)

{

// do something

}

}


--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com


"Paul Aspinall" <paul@aspy.co.uk> wrote in message
news:9%16f.61267$U9.42865@fe3.news.blueyonder.co.uk...
> Hi
> I want to write a piece of code, that will check if a particular service
> is running on a particular machine.
> Can someone give me a pointer as to which classes would be useful??
> Any sample code would be appreciated
>
> Thanks
>