Is the process name always the name of the exe?
<p>I need to know whether a process is already running but I don't want to hardcode its name. I'd rather derive it from the <code>*.exe</code> so I performed some experiments and created a simple console application where I set the assembly name in project properties to <code>foo</code> and then renamed the <code>foo.exe</code> to <code>bar.exe</code>. I checked the running processes and indeed it was <code>bar</code> that was running.</p>

<p>Is it by design and I can rely on this behavior or can a process have a different name from the <code>exe</code> and does it apply to all kinds of <code>exe</code> files or only to .NET assemblies?</p>