You can use Application.ExecutablePath Property to get the path for the executable file that started the application, including the executable name.
string path = System.Windows.Forms.Application.ExecutablePath;
using System.Reflection; string path = Assembly.GetExecutingAssembly().Location;
© 2024 Digcode.com