How can I tell my app where it's executed from?

  • Thread starter Thread starter T Driver
  • Start date Start date
T

T Driver

I have an app where the first thing a user must do is load a specific
type of file. I have provided a demo copy of this file with the app
and stored it in the install directory - but I don't know where the
user will install the app. How can I get the path to the install
directory at run time?

Thanks in advance,
Ted
 
The following gives you the directory where the exe loads from.

System.AppDomain.CurrentDomain.BaseDirectory

Jayme
 
The following gives you the directory where the exe loads from.

System.AppDomain.CurrentDomain.BaseDirectory

Jayme

Brilliant! works like a champ - thanks much!
Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top