from my main project I am running some other executables mainly from the current solution.
the output window shows me info on exiting threads when I suspect they shouldn't, what leads me to the question, how do I run my application child projects so I could process which is which ?
mainApp.exe
, sideProj1.exe
...
in main app I do as follows :
public static bool LounchSideProj1Exec()
{
/*
here I could simply call it via Process.Start();
or if I could somehow, execute it via thread start,
so I could name the thread and then see it in the output window and other places...
*/
System.Diagnostics.ProcessStartInfo Pinf = new System.Diagnostics.ProcessStartInfo();
var CurMachingMatchsProcs = System.Diagnostics.Process.GetProcesses().Where(p => p.ProcessName.ToLower().Equals("sideproj1"));
//check count, take first, this is a running process of SideProj1 else excute sideProj1:
sideProj1Proc = CurMachingMatchsProcs.First();
// or else...
SideProj1Proc = new System.Diagnostics.Process();
Pinf.FileName = @"G:\...sideProj1.exe";
sideProj1Proc.StartInfo = Pinf;
bool okTh = false;
ThreadStart ths = new ThreadStart(() => { okTh = sideProj1Proc.Start(); });
Thread th = new Thread(ths);
th.Name = "sideProj1THREAD";
th.Start();
}
what is the right approach to "Be In touch" With ..Concert Of Executed projects & main?