How can I get the Directory path of my application's installed folder?

Thanks.
lapuccaAsked:
Who is Participating?
 
Raynard7Connect With a Mentor Commented:
Hi,

there is both an executable path and startup path

http://www.thescarms.com/dotnet/apppath.asp

if you are referencing windows.forms you should be able to do

    string aPath1 = Application.ExecutablePath;
    string aPath2 = Application.StartupPath;
0
 
joechinaCommented:
This could work even windows.forms is not referenced.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.