i am trying to restart and application from within by using a batch file.
this is my batch:
TASKKILL /F /IM MyApp.exe /T
when i run it by double clicking it - it does the job - closes and reopen MyApp.exe.
when i try to do it from the application by using :
System.Diagnostics.Process p = new System.Diagnostics.Process();
String path = Application.StartupPath + @"\";
p.StartInfo.FileName = path + @"ResetApp.bat";
the batch kill my application but doesn't restart it(doesn't get to the pause line in the batch file) - i guess that when my application is terminated it also kills the batch operation.
how can i detach the batch from the application, or is there other way to make my batch run from the application indepentlly?