I am starting an executable using this code:
Process proc = new Process();
proc.StartInfo.FileName = executablePath;
proc.Start();
proc.WaitForInputIdle();
<
This:
using (Process process = Process.Start("notepad.exe"))
{
process.WaitForInputIdle();
Console.WriteLine(process.Id);
}
Actually works for me:
http://pasteboard.s3.amazonaws.com/images/1350293463417532.png
Task Manager:
http://pasteboard.s3.amazonaws.com/images/1350293536498959.png
Actually your process starts another process and you are trying to get ID of some kind of launcher. (It can start itself by the way).