PDA

Click to See Complete Forum and Search --> : Path asap please!


PITBULLCJR
Jan 9th, 2000, 08:07 PM
Say you had a ini file (I know you can just let it stay in the windows folder)in the folder with you exe file. Now you package it up and give it to someone else. But in your prgram you said the ini file had to be in a certain spot but it is unlikely that the user who installs it next will put it in the same spot. Is there a way to make it so that it it reads the ini file from the same path the exe was started in no matter where it was installed. I think i saw somewhere something lke this:
c:\...\... or something like that but that also doesn't fix if they change the drive it was installed on. Please help thanks!!

------------------
Sincerely,
Chris
:-) ;-)
Email pitbullcr7@aol.com

Fox
Jan 9th, 2000, 08:17 PM
I think you're looking for the Application path, which you can get using the App.Path function. Note that it returns the path WITHOUT backslash, expecting if you are running the application directly from a drive (e.g. C:\)
Look at the complete example:

-

Dim Path as String

Path = App.Path & IIf( Right$( App.Path, 1 ) = "\", "", "\" )

-

Path is now the Application Path with Backslash, e.g. 'C:\Program Files\Project1\'

I think this will help you.

------------------
Fox
gigotz@gmx.net
[No homepage yet]



[This message has been edited by Fox (edited 01-10-2000).]