Today I needed to package an application called PlesirReality and I noticed that it wrote an ini file into the program directory (in my case D:\Apps\PlesirReality).

I looked into this ini file (areastate.ini) and it writes user settings in there, like the last position of the window etc.

We can see this easily with Process Monitor:


This presents us with several problems:

The first problem is that the user does not have write permission in this directory so upon application exit we get an ugly error message:


We could “fix” this by giving the user write permissions to this directory or even to this specific file but here comes the seconds problem:

On a multi user environment like Citrix or Terminal Server/Remote Desktop Services it means that when one user exists he will he save his settings for all users.

And then we have a third problem:

When a users starts the application on another server he will not get the expected settings because each server will have it’s own copy of this ini file.