changing to directory exe is stored in?

closed account (4Gb4jE8b)
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.
closed account (iw0XoG1T)
you want the program to move itself to a new directory each time it is run?
closed account (3hM2Nwbp)
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.
closed account (4Gb4jE8b)
What Luc is saying is what i want. I think the environment variable will work, thank you.
Topic archived. No new replies allowed.