I\'m using automation to test an application, but sometimes I want to start the application via a batch file. When I run \"process.WaitForInputIdle(100)\" I get an error:
You can simply try and catch the exception:
Process process = ... try { process.WaitForInputIdle(100); } catch (InvalidOperationException ex) { // no graphical interface }