I have a console application in C# in which I run various arcane automation tasks. I am well aware that this should really be a Windows Service since it nee
You can search process names of existing system process. For example code, see this blog post.
You can also used a named system Mutex to see if your process is already running.
Here is some sample code. This tends to be more reliable in my experience, and is much simpler, more understandable code.