Exemple #1
0
        public void StartAndWait(ProcessStartInfo startInfo)
        {
            // And start the process and wait for it to quit
            using (RMProcess P = RMProcess.Start(startInfo))
            {
                RaiseStartEvent();

                bool Stop = false;
                while ((!Stop) && (!P.HasExited))
                {
                    P.WaitForExit(100);
                    Stop = RaiseWaitEvent();
                }

                if (!P.HasExited)
                {
                    P.Kill();
                }
            }
        }