I have an application that uses an config.xml file that is stored in C:\ProgramData\MyApp
The config file is created and edited using MyConfigApp.exe and then read by the actual application MyApp.exe.
During the installation I was logged in as Administrator and everything worked perfect!. Then we logged in as a normal user and it worked perfect here as well.
Then we needed to change a configuration. This is something a user should be able to do, so we started MyConfigApp.exe and changed the configuration.
But the change was never read into MyApp.exe.
I opened c:\ProgramData\MyApp\config.xml and the old values where in it.
Now we discovered that the user didn't have any write rights in ProgramData directory. So Windows created a new file in VirtualStore, which is not used from MyApp.exe
We added Write rights in ProgramData (and subdirectories) and removed the config.xml file from VirtualStore.
BUT every time the user runs MyConfigApp.exe it will create a file in VirtualStore!
How do I make MyConfigApp.exe read and write the file in ProgramData?