> I want to handle a running process. ex: explorer.exe
>
> How can i handle that process(explorer.exe). and is it possilbe to
> stop that process from runing.
> // System.Diagnostics namespace
> Process[] procs = Process.GetProcessesByName("EXPLORE");
[quoted text clipped - 23 lines]
>> How can i handle that process(explorer.exe). and is it possilbe to
>> stop that process from runing.
Hi,
> Process[] procs = Process.GetProcessesByName("EXPLORE");
> if (procs[0].Responding )
Just a quick observation, I think the code is missing an if clause.

Signature
Tom Spink
University of Edinburgh
sravan_reddy001 - 24 Jun 2007 17:03 GMT
private void Form1_Load(object sender, EventArgs e)
{
Process []p = Process.GetProcessesByName("Opera.exe");
if (p.Length != 0)
{
if (p[0].Responding)
{
label1.Text = "Explorer Responding";
//p[0].CloseMainWindow();
}
else
{
label1.Text = "Explorer Not Responding";
//p[0].Kill();
}
}
else
{
label1.Text = "Explorer not running";
}
this is code i had given in my prog
the display is always "Explorer not running" i tried giving giving
different names but no result.
KWienhold - 25 Jun 2007 09:52 GMT
> private void Form1_Load(object sender, EventArgs e)
> {
[quoted text clipped - 21 lines]
> the display is always "Explorer not running" i tried giving giving
> different names but no result.
If memory serves, the name of the process should be "Opera", not
"Opera.exe".
hth,
Kevin Wienhold
sravan_reddy001 - 25 Jun 2007 14:19 GMT
I gav the name opera, explorer and Explorer, explorer.exe and tried
many others.
the message is Explorer Not Running in the label1
Tom Spink - 25 Jun 2007 19:04 GMT
> I gav the name opera, explorer and Explorer, explorer.exe and tried
> many others.
>
> the message is Explorer Not Running in the label1
Hi,
Did you try: "EXPLORE"?

Signature
Tom Spink
University of Edinburgh
sravan_reddy001 - 26 Jun 2007 03:21 GMT
i tried....
when i tried for "svchost" i got the result...
but didn't got anthing about "Explorer"