|
-
Jan 9th, 2000, 09:07 PM
#1
Thread Starter
Hyperactive Member
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 [email protected]
-
Jan 9th, 2000, 09:17 PM
#2
PowerPoster
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
[email protected]
[No homepage yet]
[This message has been edited by Fox (edited 01-10-2000).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|