Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Q: How do I get the path of where the prog is running? 1

Status
Not open for further replies.

ctlin

Technical User
Apr 17, 2002
77
US
say I have a the VB executable running from C:\winnt\profiles\ctlin\desktop
how would I make a call in VB to return this full path as a String for the program to use?

Thanks.
 
CurDir, if I remember correctly, will give you the "Run In" directory from a shortcut. I wouldn't rely on that for the app path. App.path is the way to go.
 
Be aware however that the string returned by App.Path may or may not end with the backslash character "\".

A nice circumvention to this problem is given by swilliams in thread222-43340

_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top