better mousetrap solution

Unfortunately, even checking file paths is not fullproof.

If you really want to prevent multiple instances, regardless of if the myApp.exe is in a different folder, or even if they rename the file, then you have to take a different approach.

One of the easier solutions is to set up a OS level named Mutex and check that when the app starts.

The following c# code...