We\'ve got a winforms LOB application, which under normal circumstances should be started from a launcher that should do basic version checks and download any updated compon
See here: How to get parent process in .NET in managed way
From the link:
using System.Diagnostics;
PerformanceCounter pc = new PerformanceCounter("Process",
"Creating Process ID", Process.GetCurrentProcess().ProcessName);
return Process.GetProcessById((int)pc.NextValue());
[Edit: Also see the System.Diagnostics FAQ for some more information about this. Thanks to Justin for the link.]