How to Get Path of Running Application

Sharing is Caring

Getting the path of the running application is really simple, and is pretty important if you allow the user to install the application anywhere (which you really should do!) I’ve just included the way to do it for windows forms, but it isn’t that hard to adopt to other situations.


using System.IO;
using System.Windows.Forms;

//......

string executing = Path.GetDirectoryName(Application.ExecutablePath);

Author: Brian Cline

Brian is a programmer living in Niagara Falls with ten years of development experience. He is passionate about automation, business process re-engineering, and gamification. For the last six years or so, he has been working with Salesforce and JavaScript.

Related Posts

Sharing is Caring