Running control.exe as process does not WaitForExit()

Posted by Lisa Alliss on Stack Overflow See other posts from Stack Overflow or by Lisa Alliss
Published on 2012-09-04T20:55:43Z Indexed on 2012/09/04 21:38 UTC
Read the original article Hit count: 108

Filed under:

I am running control.exe as a process. (Windows 7 OS, .NET 3.5, C#). It does not stop at WaitForExit() as expected. It immediately "exits" the process even though the control.exe window is still open. I have tried the process.Exited event also and that is triggered before the application exits as well. Here is my code:

            Process process = new Process();
            process.StartInfo.FileName = @"c:\windows\system32\control.exe";
            process.StartInfo.Arguments = @"userpasswords";


            process.Start();

            process.WaitForExit();

© Stack Overflow or respective owner

Related posts about waitforexit