I have simple win application(writen using .net C#) that needs to be started from cmd.exe, and then write to that console, but problem is that i need process id from that cmd.exe process. I can get all running process,
Process[] procList = Process.GetProcessesByName("cmd");
but how to find my? :)
Maybe to read input, and check is "ApplicationName.exe" writen inside, or to get curently active cmd.exe window? But with what function?