PC Review


Reply
Thread Tools Rate Thread

Application.StartupPath in console application

 
 
=?Utf-8?B?a2Q=?=
Guest
Posts: n/a
 
      8th Mar 2005
Hi All,

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

kd
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      8th Mar 2005
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


 
Reply With Quote
 
=?Utf-8?B?a2Q=?=
Guest
Posts: n/a
 
      8th Mar 2005

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
>
>
>

 
Reply With Quote
 
JohnFol
Guest
Posts: n/a
 
      8th Mar 2005
Yes, but it's a cludge.


Dim strStartupDir As String = CurDir()

MsgBox(strStartupDir)





"kd" <(E-Mail Removed)> wrote in message
news:87DB3870-1E50-4E93-9165-(E-Mail Removed)...
>
> 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
>>
>>
>>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      8th Mar 2005
"kd" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.StartupPath RogerM Microsoft Excel Discussion 3 6th May 2009 02:42 PM
Application.StartupPath equivalent for a console app? Cleetus Awreetus Microsoft VB .NET 3 31st Jan 2009 10:50 PM
Application.StartupPath Doug Bell Microsoft Dot NET Compact Framework 2 6th Jul 2007 08:17 AM
Application.StartupPath =?Utf-8?B?cm9kY2hhcg==?= Microsoft VB .NET 4 10th Apr 2005 12:19 AM
how to get startupPath in console application Ron Microsoft VB .NET 2 17th Jan 2005 08:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:12 PM.