In VB.NET:
Dim aPath As String
Dim aName As String
aName = _
System.Reflection.Assembly.GetExecutingAssembly. _
GetModules()(0).FullyQualifiedName
aPath = System.IO.Path.GetDirectoryName(aName)
'
' Or
'
aPath = System.Reflection.Assembly. _
GetExecutingAssembly.Location
Oder ganz einfach unter VB.NET:
My.Application.Info.DirectoryPath
Quelle: http://www.thescarms.com/dotnet/AppPath.aspx
1.15.2010
Abonnieren
Posts (Atom)