c# - Process.Start takes long time to start outside application -
i have method launches second exe. issue i'm having if i'm in debug mode in visual studio , put breakpoint directly after process.start call second application launches if have no break points in vs or run main c# application outside of vs launching of second application via process.start can take 2 minutes. method below , put breakpoint see immediate launch of 2nd app @ line "if(null != _processmine)". put launch of second exe in worker thread because when close main exe want second exe close also. public static void runbtnprocessthread(string processname, string sargs, button btn) { // disable button until release newly launched process btn.enabled = false; backgroundworker worker = new backgroundworker(); worker.dowork += (doworksender, doworkargs) => { processstartinfo startinfo = new processstartinfo(); startinfo.createnowindow = false; startinfo.useshellexecute = false...