Jiri TRAVNICEK - 2003-11-06

First of all sorry if this has been discussed before. I spent more than one hour searching both the mailing list and forum and didn't find any discussion on this particular problem. If the SourceForge.net had a better search...

I'd like to point out the choice location Dev-C++ uses to store it's configuration files (and probably some other stuff?) to.

First of all I'd like to say I appreciate the care that was taken to support multi-user environment at least on the Windows NT family (ie. Windows NT, 2000 and XP; hereinafter only "WinNT"). I even more apprecate the "-c" command-line option which will temporarily solve this problem for me.

But despite this all I cannot say anything else than the choice for storing the configuration files used on WinNT is *wrong*. Let me explain why I think so.

In fact I'm not completely sure why did Micro$oft come with the "Local Settings" subdirectory, but the problem with that occurs when you work in an environment which uses roaming user profiles. The "Local Settings" directory and it's contents are never copied to the server when the user loggs out of his/her Windows session. So instead of using the directory "<user profile directory>\Local Settings\Application Data" I'd personally vote that "<user profile directory>\Application Data" is used instead. This way everything works find and the configuration data will be copied to the server upon logout and back to the local machine upon login. (Too bad to say Micro$oft does the same at default in Outlook Express, but we won't compare to them, eh? ;-D )

Beside that I have the bad feeling the path mentioned above is hard-coded in the source files (which I couldn't get and check; the "devcpp.exe" file however contains this string which makes me think so). If this is the case, I'd suggest a more sophisticated method is used, as the user profiles aren't located in "%SystemDrive%\Documents and Settings" but in "%SystemDrive%\Profiles" in Windows NT to make things different in later Windows 2000 and XP. To make things more complicated, some localized versions of Windows use complete different directory names. For the "Application Data" directory location an environment variable could be used. This Windows XP I'm just working on seems to provide "%APPDATA%", but I'm not sure about it's availability on Windows NT. Windows 2000 should have it as well. Some programs also place the files right in the <user profile directory>, which is pointed by "%USERPROFILE%" - this should work on Windows NT as well. Furthermore, for example MinGW Developer Studio also accepts the "%HOME%" variable, which overrides the methods mentioned before, which are otherwise used as well.

Well, sorry for the long posting, but I hope it will be of any help. Also please feel free to ignore the above paragraph, if you already use some better method of detecting the <user profile directory> location.