Find path to EXE?

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I need to find the path to my EXE. Is there a better way than:

string exePath = Assembly.GetExecutingAssembly().CodeBase;

Thanks.
 
Billl,

If yours is a Windows Forms app, the Application.StartupPath returns the
path to the startup directory of the app, and Application.ExecutablePath -
the full path of the EXE.

Regards - Octavio
 
Back
Top