Finding the directory where the .exe file is
Posted: Fri Jun 24, 2011 9:23 pm
Hello all
I've been trying to find out how to find the directory to the .exe file that is executing. Because when I use GetCurrentDirectory() I get the directory where the program is loaded from. Like when I right click on "textFile.txt" and choose "Open with..." and then select the .exe program, the current directory for the program will now be the directory for the "textFile.txt" and not the directory for the .exe program is in.
Thank you in advance.
I've been trying to find out how to find the directory to the .exe file that is executing. Because when I use GetCurrentDirectory() I get the directory where the program is loaded from. Like when I right click on "textFile.txt" and choose "Open with..." and then select the .exe program, the current directory for the program will now be the directory for the "textFile.txt" and not the directory for the .exe program is in.
Thank you in advance.