|
-
Mar 9th, 2007, 12:02 PM
#1
Thread Starter
New Member
Trying to find the path where my program is installed
Hi guys. I'm making a program that has a text file and a configuration file that are stored in my programs installation path, but I am having difficulties setting a variable to the path my program is currently installed to, where my Readme.txt and config file will be. I need this path in a variable so I can use it to read these files. It's gotta be some variation on a GetDirectory like method. Does anyone have an idea how I can do this? For some reason, I just can't find the info I need and I'm new to VB (Though I am moderately skilled with C++) Thanks.
-
Mar 9th, 2007, 12:10 PM
#2
Re: Trying to find the path where my program is installed
Application.StartupPath (which would make jmcilhinny cringe)
or
| DataDirectory |
-
Mar 9th, 2007, 12:12 PM
#3
Hyperactive Member
Re: Trying to find the path where my program is installed
use the following...
Code:
Dim strPath as string=Application.StartupPath.ToString
If my post helps , please feel free to rate it 
-
Mar 9th, 2007, 12:17 PM
#4
Re: Trying to find the path where my program is installed
Application.StartupPath returns a string so there is no need to call the ToString method at the end.
-
Mar 9th, 2007, 12:21 PM
#5
Thread Starter
New Member
Re: Trying to find the path where my program is installed
Thank you so much for the help, you guys. I should have guessed that it was in the application class. Have a wonderful day and happy coding, my friends!
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
|