App.Path

A

Ash Phillips

Is there any alternative to App.Path in VB .NET?

Also App.Major/Minor/Revision?

Thanks in advance!
 
K

Ken Tucker [MVP]

Hi,

Application.StartupPath, Application.Version. Application does not
alway return the right result. Here is what i use.

Public Function AppPath() As String

Return
System.IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly().Location)

End Function



Ken
--------------------
Is there any alternative to App.Path in VB .NET?

Also App.Major/Minor/Revision?

Thanks in advance!
 
J

james

Also don't forget to use:

Imports System.IO
Imports System.Reflection

It seems if I leave those two out I end up with problems. Otherwise, Ken's
suggestion seems to work the best of all solutions .
james
 

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

Similar Threads

Odd resonses from VB9 12
Where is app.path? 6
Real beginners stuff 2
App.Path 5
App.Path in vb.net 2
Special Folders for the program.exe 3
dumb question - How can I get the app.path from .NET? 14
App.Path replacement 16

Top