Okay so there are a lot of ways to work with directories and most are OS specific, this much I understand. But how could I change to the directory that the exe file being run is stored in? I don't have any idea, and as such have no code :( sorry.
I think that headlessgargoyle wants to find the directory in which the executable was launched from. If the executable is installed (in windows at least) you can set an environment variable or make a registry entry. This however breaks if the executable is moved, of course.