Tag: Application

How to Get Path of Running Application in C#

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);