How to Check if a File Path is Valid
<p>I have a string that is in the registry that can either point to an <code>.exe</code>, <code>.txt</code> along with certain command line arguments like:</p>

<pre><code>C:\\PAthtoTheExe\program1.exe -arg1 -arg2
</code></pre>

<p>How do I determine if the "program1.exe" is a valid executable, IE that it points to an existing file? (this could be removed if the user uninstalls the application for eg:)</p>

<p>I don't like the idea of parsing out the arguments, because right now, the path can either point to an <code>.exe</code> or <code>.txt</code> or a <code>.url</code>. I would have to put in a long if else to do that.</p>
