Running control.exe as process does not WaitForExit()
- by Lisa Alliss
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();