473,394 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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

Jun 19 '06 #1
9 4923
JAM
It should be in My Documents > Visual Studio projects > then the project name.

"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

Jun 19 '06 #2
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

Jun 19 '06 #3
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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

Jun 20 '06 #4

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

:)

-tom

ronchese (a) ha scritto:
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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


Jun 20 '06 #5
Which needs an import and cost more processing time (invisible of course).

Cor

<to**************@uniroma1.it> schreef in bericht
news:11**********************@h76g2000cwa.googlegr oups.com...

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

:)

-tom

ronchese (a) ha scritto:
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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
>
>
>

Jun 20 '06 #6
Bob
Thanks
"Terry" <Te***@nospam.nospam> wrote in message
news:70**********************************@microsof t.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

Jun 20 '06 #7
Bob
Thanks
"ronchese" <info(a)carsoftnet.com.br> wrote in message
news:uC**************@TK2MSFTNGP05.phx.gbl...
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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


Jun 20 '06 #8
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:
Which needs an import and cost more processing time (invisible of course).

Cor

<to**************@uniroma1.it> schreef in bericht
news:11**********************@h76g2000cwa.googlegr oups.com...

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

:)

-tom

ronchese (a) ha scritto:
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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
>
>
>


Jun 20 '06 #9
Bob
Thanks
<to**************@uniroma1.it> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com...

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

:)

-tom

ronchese (a) ha scritto:
or Application.StartupPath

"Bob" <bd*****@sgiims.com> wrote in message
news:%2******************@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
>
>
>

Jun 20 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: J Sharman | last post by:
What is the easiest way to import an XML Datafeed from a URL into a MYSQL Database? Possibly using PHP Regards Joe PS Please answer to group and joe@joesharman.co.uk
1
by: ricolee99 | last post by:
Hi There, I'm trying to convert some VB code into C#. There is a function defined in VB, GetAbsolutePathName(path) where it returns the complete path from the root of the drive for the...
14
by: Allen | last post by:
Greetings, I need to pass a file path to an application. This file path contains long directory and file names. The target application, pdftotext.exe, only accepts short directory and file...
4
by: Jim | last post by:
I am writing a Windows Service in VB.Net, and right upfront I need to pass the path to my config.xml file to the constructor of the class which reads it. In the old days, App.Path & "\config.xml"...
0
by: Jody Gelowitz | last post by:
VS2005 Standard Edition WinXP Pro SP2 I have setup a Web project under: http://localhost/myproject/ and have received a "Failed to map the path '/MyProject/App_GlobalResources'." error...
4
by: WayneM | last post by:
In VB6 there was a Last Position in the popup menu that took you back in the IDE to the last line that you were working on. Is there an equivalent in VS2005? Thanks for info in advanced, ...
4
by: John Smith | last post by:
Hello, I'm not sure if these are the appropriate forums for my question since it is closer to about Visual Studio 2005 than it is about .NET framework. So please pardon me and direct me to a...
3
by: geobas | last post by:
It's only a simple line of VB6 code WebBrowser1.Navigate App.Path & "\index.html" l have VS2005 .How can l write this in .NET Thanks in advance for replies
3
by: Wolfgang Meister | last post by:
I would like to append text to a file which might exist or not. What is the easiest way to open or create it depending if it exists or not and to set it into an "append" text mode?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.