Skip to content

How to Get Path of Running Application in C#

C#.NET · March 12, 2011

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

Sharing is Caring
Application File Path