Sets the period of time to wait for the associated process to exit, and blocks the current thread of execution until the time has elapsed or the process has exited.
Refer to my blog for very helpful advice on Process WaitForExit examples..Jeff Fischer