|please see this code i want to start a process.After successful
starting i want to get its id for further processing.For that
purpose most of my processes are setup files (of some software like installers)
most of the processes execute this code successfuly but when i start
a process for example setup file of yahoo messanger installer or VCD Cutter installer
and some other software they all raise an exception(InvalidOperationException)
at last line although the process started successfully and its window appears
,and started process has its existance.
i want to get its id only(in last line of this code ).
my question is
why it raise an exception although started process has its existance?
i think its id is changed.am i right ?
if yes how to trace it id?
or it might be possible that the main process i start also start some other process and
exit itself. if thats true how to trace these processes?
tmpProcess = new Process();
tmpProcess.Exited += new EventHandler(this.ProcessExited);