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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User pathnames during installation

Status
Not open for further replies.

LordofShadows

Programmer
Apr 22, 2002
13
US
I just grouped together a Yahtzee program for installation. Everything worked except for one little problem I KNOW I'll run in to. In my code, there is a statement that opens such and such a file and I have pictures (which are called into use, also) from my c-drive on my form. When I put it all together, what kind of code can I write that will make sure the line will read Open "Wherever your yahtzee program is located". Is there some syntax that will get the pathname of wherever they put my program?
 
Still, how am I going to be able to say Ineed to open a certain file in that app's path. Do I just write:

PATH=App.Path
Open PATH+"Text.txt" ???
 
You know what, I think that's exactly how it works. I just tested it on my computer and it works. Thanks.
 
What if the user moves that file into another folder? Then there would be another \Folder before \Text.txt. How can I account for that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top