<p>I have a loader.exe with Main() that loads the 'UI' in WPF, the thing is that I want only one instance of the loader.exe, how can I achieve it? </p>

<p>Is there a way a user clicks loader.exe it should check if an existing loader.exe is running and does nothing.</p>

<p>currently I have </p>

<p>loader.exe </p>

<p>with </p>

<pre><code>main() 
....
..
Load UI
...
</code></pre>

<p>the loader has no idea what its loading etc so I can't do many things with the loader project...</p>

<p>Any help n code is highly appreciated</p>

<p>Thanks in advance. </p>

Have a look at:
http://yogesh.jagotagroup.com/blog/post/2008/07/03/Ways-of-making-a-WPF-application-Single-Instance.aspx
Also, you might find a more detailed answer in the following post here on StackOverflow:
What is the correct way to create a single-instance application?