How to do: The first instance of an app will execute a process, second instance will kill the process later
<p>I want to create a console application that behaves as follows:</p>

<ol>
<li>The first instance of the app will execute a process.</li>
<li>The second instance executed later will kill the process.</li>
</ol>

<p>Is there a simple way to do so?</p>

<p>EDIT:
The second instance also terminates the first instance and itself.</p>

<p>EDIT 2:</p>

<p>More details scenario is as follows:</p>

<p>Assume there is no instance of my application running.
If I execute my application, the new instance will run.
The application will create a process that execute Adobe Acrobat Reader X (for example).</p>

<p>Later, I execute my application again just to kill the running Adobe Acrobat Reader X and of course its host (the first instance of my application).</p>
