Finding App Path in .Net 
Author Message
 Finding App Path in .Net

Useing:
Application.StatupPath

Quote:
> Hi,
> Please give me a pointer if you have time: How do you find
> the path of an application in vb.net?

> Thanks in advance,
> lebroy



Tue, 20 Jul 2004 15:26:09 GMT  
 Finding App Path in .Net
Environment.CurrentDirectory.

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


Quote:
> Hi,
> Please give me a pointer if you have time: How do you find
> the path of an application in vb.net?

> Thanks in advance,
> lebroy



Tue, 20 Jul 2004 19:42:35 GMT  
 Finding App Path in .Net
That's not reliable since an app could be started via a shortcut with a different working directory...

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> Environment.CurrentDirectory.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> > Hi,
> > Please give me a pointer if you have time: How do you find
> > the path of an application in vb.net?

> > Thanks in advance,
> > lebroy



Wed, 21 Jul 2004 11:55:10 GMT  
 Finding App Path in .Net
Not so.  The CurrentDirectory property will always return the directory from
which the current process was initiated.  Therefore, it doesn't matter if
you start it with a shortcut in a different directory.

I have an app right now that access data files in its own directory.  Even
if I start it from a shortcut on my desktop, the data files are correctly
accessed with the CurrentDirectory property because the process was
initiated in the directory.

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com



That's not reliable since an app could be started via a shortcut with a
different working directory...

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:
> Environment.CurrentDirectory.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> > Hi,
> > Please give me a pointer if you have time: How do you find
> > the path of an application in vb.net?

> > Thanks in advance,
> > lebroy



Wed, 21 Jul 2004 12:52:39 GMT  
 Finding App Path in .Net
You're right ;-)...I was thinking of the Directory.GetCurrentDirectory method.  Or maybe cross-pollination with WshShell.CurrentDirectory <g>!

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> Not so.  The CurrentDirectory property will always return the directory from
> which the current process was initiated.  Therefore, it doesn't matter if
> you start it with a shortcut in a different directory.

> I have an app right now that access data files in its own directory.  Even
> if I start it from a shortcut on my desktop, the data files are correctly
> accessed with the CurrentDirectory property because the process was
> initiated in the directory.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> That's not reliable since an app could be started via a shortcut with a
> different working directory...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --


> > Environment.CurrentDirectory.

> > --
> > Jim
> > Jimco Add-ins
> > Freeware add-ins and utilities for Microsoft FrontPage
> > http://www.jimcoaddins.com



> > > Hi,
> > > Please give me a pointer if you have time: How do you find
> > > the path of an application in vb.net?

> > > Thanks in advance,
> > > lebroy



Wed, 21 Jul 2004 13:51:45 GMT  
 Finding App Path in .Net
It's probably the first time I've been right this week.  :)

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com



You're right ;-)...I was thinking of the Directory.GetCurrentDirectory
method.  Or maybe cross-pollination with WshShell.CurrentDirectory <g>!

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:
> Not so.  The CurrentDirectory property will always return the directory
from
> which the current process was initiated.  Therefore, it doesn't matter if
> you start it with a shortcut in a different directory.

> I have an app right now that access data files in its own directory.  Even
> if I start it from a shortcut on my desktop, the data files are correctly
> accessed with the CurrentDirectory property because the process was
> initiated in the directory.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> That's not reliable since an app could be started via a shortcut with a
> different working directory...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --


> > Environment.CurrentDirectory.

> > --
> > Jim
> > Jimco Add-ins
> > Freeware add-ins and utilities for Microsoft FrontPage
> > http://www.jimcoaddins.com



> > > Hi,
> > > Please give me a pointer if you have time: How do you find
> > > the path of an application in vb.net?

> > > Thanks in advance,
> > > lebroy



Wed, 21 Jul 2004 21:30:14 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. App.path at .Net

2. How to get App.Path in VB.NET

3. What's the equivalence of APP.PATH of VB6 in VB.NET

4. App.Path in Visual Basic .NET

5. Finding Application path of VB .Net project

6. VB.NET Equivalent of APP.Path in VB6

7. Couldn't find net path or user name

8. Finding Path to VB app's executable

9. Find app path

10. Newbie - Finding apps path

11. How to get App.Path in VB.NET

12. How to find app.path?

 

 
Powered by phpBB® Forum Software