Check an application exists

Hi,Is there any way of checking if an application exists when opening a form, and if it does run it, if not, then ignore some code. Also is it possible to check if an application is already running when opening a form. (Or alternatively close an external application when exiting a form.)