Hi, I have a problem I am stuck on. I have developed a VB app, which reads a config/ini file from a specified path. However, I have created an installation program, which lets you choose the location of where to install. Now, when the components (the VB exe and the config file) are installed the the MAINAPP folder (say MAINFOLDER), it executes properly and works!
However, if the path is changed during the installation, say from D:\MAINFOLDER to D:\ProgramFiles\MAINFOLDER, it cannot find the path and returns a RUN-TIME path error.
I need a method of automatically knowing what the directory level of the exe and cfg file that is read. It needs to work, regardless of the install path. Is there a way to just reference the folder that they are both in, regardless of the levels? If the path is the mainfolder, it is \MAINFOLDER\EXE. If it is one level it is ..\MAINFOLDER\EXE. But how can I have it for both possibilities. TIA!