469,312 Members | 2,496 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

Application.StartupPath in console application

kd
Hi All,

Is there an equivalent for Application.StartupPath in a console application?

kd
Nov 21 '05 #1
4 9707
KD,

Is there an equivalent for Application.StartupPath in a console
application?

Can you explain this question a little bit more. I thought that a console
applicion was starting in the path you start it on the console?

Cor
Nov 21 '05 #2
kd

Is there someway to capture this path through code?

kd.

"Cor Ligthert" wrote:
KD,

Is there an equivalent for Application.StartupPath in a console
application?

Can you explain this question a little bit more. I thought that a console
applicion was starting in the path you start it on the console?

Cor

Nov 21 '05 #3
Yes, but it's a cludge.
Dim strStartupDir As String = CurDir()

MsgBox(strStartupDir)

"kd" <kd@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...

Is there someway to capture this path through code?

kd.

"Cor Ligthert" wrote:
KD,
>
> Is there an equivalent for Application.StartupPath in a console
> application?
>

Can you explain this question a little bit more. I thought that a
console
applicion was starting in the path you start it on the console?

Cor

Nov 21 '05 #4
"kd" <kd@discussions.microsoft.com> schrieb:
Is there an equivalent for Application.StartupPath in a console
application?


\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetEntryAssembly().Location)
End Function
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Frank Rizzo | last post: by
5 posts views Thread by Robert Magnusson | last post: by
8 posts views Thread by jcrouse | last post: by
1 post views Thread by Sean | last post: by
4 posts views Thread by Philip Wagenaar | last post: by
reply views Thread by =?Utf-8?B?Sm9iIExvdA==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.