Home All Groups Group Topic Archive Search About

Easiest way to get the equivalent of vb6 app.path in vs2005 Vb.net

Author
19 Jun 2006 10:11 PM
Bob
Been looking for that trick for a long time I need the path in which the
executable is running but not including the exe filename.

I'm looking under my.application but nothing there as far as I can see

Any help appreciated.

Bob

Author
19 Jun 2006 10:49 PM
JAM
It should be in My Documents > Visual Studio projects > then the project name.

Show quoteHide quote
"Bob" wrote:

> Been looking for that trick for a long time I need the path in which the
> executable is running but not including the exe filename.
>
> I'm looking under my.application but nothing there as far as I can see
>
> Any help appreciated.
>
> Bob
>
>
>
>
Author
19 Jun 2006 10:56 PM
Terry
My.Application.Info.DirectoryPath
--
Terry


Show quoteHide quote
"Bob" wrote:

> Been looking for that trick for a long time I need the path in which the
> executable is running but not including the exe filename.
>
> I'm looking under my.application but nothing there as far as I can see
>
> Any help appreciated.
>
> Bob
>
>
>
>
Author
20 Jun 2006 4:40 PM
Bob
Thanks
Show quoteHide quote
"Terry" <Terry@nospam.nospam> wrote in message
news:700E5356-C2A7-4CC1-9012-4A66A530833F@microsoft.com...
> My.Application.Info.DirectoryPath
> --
> Terry
>
>
> "Bob" wrote:
>
>> Been looking for that trick for a long time I need the path in which the
>> executable is running but not including the exe filename.
>>
>> I'm looking under my.application but nothing there as far as I can see
>>
>> Any help appreciated.
>>
>> Bob
>>
>>
>>
>>
Author
20 Jun 2006 4:48 AM
ronchese
or Application.StartupPath



Show quoteHide quote
"Bob" <bduf***@sgiims.com> wrote in message
news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
> Been looking for that trick for a long time I need the path in which the
> executable is running but not including the exe filename.
>
> I'm looking under my.application but nothing there as far as I can see
>
> Any help appreciated.
>
> Bob
>
>
>
Author
20 Jun 2006 2:38 PM
tommaso.gastaldi
or


System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)

:)

-tom

ronchese (a) ha scritto:

Show quoteHide quote
> or Application.StartupPath
>
>
>
> "Bob" <bduf***@sgiims.com> wrote in message
> news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
> > Been looking for that trick for a long time I need the path in which the
> > executable is running but not including the exe filename.
> >
> > I'm looking under my.application but nothing there as far as I can see
> >
> > Any help appreciated.
> >
> > Bob
> >
> >
> >
Author
20 Jun 2006 2:56 PM
Cor Ligthert [MVP]
Which needs an import and cost more processing time (invisible of course).

Cor

<tommaso.gasta***@uniroma1.it> schreef in bericht
Show quoteHide quote
news:1150814290.287136.211020@h76g2000cwa.googlegroups.com...
>
> or
>
>
> System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)
>
> :)
>
> -tom
>
> ronchese (a) ha scritto:
>
>> or Application.StartupPath
>>
>>
>>
>> "Bob" <bduf***@sgiims.com> wrote in message
>> news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
>> > Been looking for that trick for a long time I need the path in which
>> > the
>> > executable is running but not including the exe filename.
>> >
>> > I'm looking under my.application but nothing there as far as I can see
>> >
>> > Any help appreciated.
>> >
>> > Bob
>> >
>> >
>> >
>
Author
20 Jun 2006 7:22 PM
tommaso.gastaldi
Good point Cor!

Further, to tell the thruth, that method is not completely equivalent,
as, in case of a dll executing,
I guess it will indicate the dll folder (not necessarily equal to the
app startup dir).

Depending on the context, I guess that sometimes one might even need
that behavior.

:)

-tom

Cor Ligthert [MVP] ha scritto:

Show quoteHide quote
> Which needs an import and cost more processing time (invisible of course).
>
> Cor
>
> <tommaso.gasta***@uniroma1.it> schreef in bericht
> news:1150814290.287136.211020@h76g2000cwa.googlegroups.com...
> >
> > or
> >
> >
> > System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)
> >
> > :)
> >
> > -tom
> >
> > ronchese (a) ha scritto:
> >
> >> or Application.StartupPath
> >>
> >>
> >>
> >> "Bob" <bduf***@sgiims.com> wrote in message
> >> news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
> >> > Been looking for that trick for a long time I need the path in which
> >> > the
> >> > executable is running but not including the exe filename.
> >> >
> >> > I'm looking under my.application but nothing there as far as I can see
> >> >
> >> > Any help appreciated.
> >> >
> >> > Bob
> >> >
> >> >
> >> >
> >
Author
20 Jun 2006 4:41 PM
Bob
Thanks
<tommaso.gasta***@uniroma1.it> wrote in message
Show quoteHide quote
news:1150814290.287136.211020@h76g2000cwa.googlegroups.com...
>
> or
>
>
> System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)
>
> :)
>
> -tom
>
> ronchese (a) ha scritto:
>
>> or Application.StartupPath
>>
>>
>>
>> "Bob" <bduf***@sgiims.com> wrote in message
>> news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
>> > Been looking for that trick for a long time I need the path in which
>> > the
>> > executable is running but not including the exe filename.
>> >
>> > I'm looking under my.application but nothing there as far as I can see
>> >
>> > Any help appreciated.
>> >
>> > Bob
>> >
>> >
>> >
>
Author
20 Jun 2006 4:41 PM
Bob
Thanks
Show quoteHide quote
"ronchese" <info(a)carsoftnet.com.br> wrote in message
news:uCwPGSClGHA.1244@TK2MSFTNGP05.phx.gbl...
> or Application.StartupPath
>
>
>
> "Bob" <bduf***@sgiims.com> wrote in message
> news:%23mafS1%23kGHA.3816@TK2MSFTNGP02.phx.gbl...
>> Been looking for that trick for a long time I need the path in which the
>> executable is running but not including the exe filename.
>>
>> I'm looking under my.application but nothing there as far as I can see
>>
>> Any help appreciated.
>>
>> Bob
>>
>>
>>
>
>