Process.WaitForExit doesn't apply

  • Thread starter Thread starter Pujo Aji
  • Start date Start date
P

Pujo Aji

Hello,

I have a program that run notepad like this:
ProcessStartInfo myP = new ProcessStartInfo();

myP.FileName = "notepad.exe";

using(Process myp = new Process()){
myp.StartInfo = myP;
try{
myp.Start();
myp.WaitForExit();
Console.WriteLine("alles guttes");
}
catch{
Console.WriteLine("fail");
}
}

This is working fine, "alles guttes" will be executed after I close
Notepad.
But when I change the "notepad.exe" with third party vendor software which
processing files and so on, "alles guttes" directly appear and it seems
myp.WaitForExit is not working.

Am I miss something?

Pujo
 
Pujo said:
Hello,

I have a program that run notepad like this:
<snip>

Perhaps that other program spawns other programs itself and immediately
quit ?
 
Hi,

I found that my third party program doesn't exist in task manager
application, but do exist in task manager process.

And if I use notepad, notepad exists in task manager application. Is this
the reason that I can't understand when it stops.

Is there any way out to track this program?

Sincerely Yours,
Pujo
 
Back
Top