GetInstDir()

I am using GetInstDir() to access the current directory of execution of my executable file

When I debugged the code the directory is coming like this one.

"D:\\SVN_NEW\\NewProject\\SetupScr\\..\\setup files\\setup.exe"

on execution of function SHFileOperation with this path it results in returning of value 2. Which is error file not found.

After that I hard code the path to

"D:\\SVN_NEW\\NewProject\\setup files\\setup.exe"

Which is working fine.

Now, the question is \\..\\ Is it giving problem. What should I do to change my directory to second one. As this is working fine and this is what I really need.


Welcome in case of any more information.
GetInstDir()? Shouldn't you using GetCurrentDirectory()?
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364934%28v=vs.85%29.aspx
Solved.

Yes I am accessing the current directory. The problem was with the file name.

Thanks for your reply kbw.
Topic archived. No new replies allowed.