   Why is working dir still Release/ even after moving .exe somewher else?
  I don''t recall ever having this problem before. I built my Visual C++ 6.0 project in Release mode. It runs fine.I copied it and its files to another directory as if it was being installed somewhere else. I run it from that location.Why the heck is it still accessing files in the Release/ directory? All my file opens, etc. are in relative mode. I do not hardcode my directories. Why does the program access the files in the Release/ directory? This program no longer has anything to do with that directory.Does Visual C hardcode that into my app? I don''t recall it doing something like this before. Did I forget to toggle something in my build?  
  Try to get the path of the current working directory when you startup your app. Paste this path before your file names and you should be fine. I had the same trouble with my ini files and i fixed it this way.  ;  Yeah, it looks like I''m going to have to do that. Does anyone else have any suggestions?  ;  The working directory is whatever directory you are in when the application is launched.Are you running from the IDE?  You can set the working directory in the environment settings.    - Magmai Kai Holmlor"Oh, like you''ve   never written buggy code" - Lee[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ][Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spirit(xBNF)][Free C Libraries | zlib ];quote:Original post by Magmai Kai Holmlor  The working directory is whatever directory you are in when the application is launched.   Yeah.Then why is my program accessing and modifying the files in the Relase/ directory even though I''ve copied it elsewhere?  ;  Actually, it appears that the program is accessing files in the C:\WINNT directory as well (or instead), whatever.I called GetCurrentDirectory() and _getcwd() and both return C:\WINNT.This is no good. My program is trying to load a file from the same directory that the program was launched from. Since my program can''t know where it is installed, how do I find the directory of where the program resides?  ;  I assume that this problemhas to do with multiple users.  ;  just curious, are you using the privateprofile... api functions to access these files? and what OS are you using?  ;  I don''t know anything about privateprofile and whether I''m inadverdently using it or not.I''m building on Win2k with MSVC 6. I want the program to work on 95/98/2k/xp. It''s a pretty simple app.  ;  Use GetModuleFileName() with hModule set to NULL to retrieve the directory in which the executable resides.    RapscallionGL - arriving soon.  