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 *.exe
so I performed some experiments and created a simple console application where I set the assembly name in project properties to foo
and then renamed the foo.exe
to bar.exe
. I checked the running processes and indeed it was bar
that was running.
Is it by design and I can rely on this behavior or can a process have a different name from the exe
and does it apply to all kinds of exe
files or only to .NET assemblies?