Process p = null; try { // Start the process p = System.Diagnostics.Process.Start(this.exeName); // Wait for process to be created and enter idle condition p.WaitForInputIdle(); // Get the main handle appWin = p.MainWindowHandle; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); }