Q:

App.Config file being read incorrectly when not run as administrator

I have a bit of a strange issue. We have created a Wix installer file for an application that we have created which includes a xxxx.exe.config file containing a connection string. 
When the application starts it tests the connection string to ensure it can connect, and if it fails it prompts for a new connection string, restarts and tries again. 
All appears to work when you run as Administrator, but when I run it as a normal user (Which is required), even when I manually clear the connection string from the xxxx.exe.config file, the application is still reading the old connection string that is no longer there. 
I figured it was a folder permission thing but I took ownership and full control of the entire 'Program Files (x86)' folder and I can edit the xxxx.exe.config file without requiring admin priviledges now but it still reads the old connection string.
All works as planned when not installed via WIX. I know it is reading an old connection string as I have it displaying in a messagebox on startup. 
Anybody got any ideas what I could try next? I'm not sure how it is reading an old connection string if I am honest when it isn't even there (It is looking in the correct place, too). Any help appreciated.
Edit - It seems to be looking at that directory with that connection string, but I can completely remove that file from the directory and it still displays the same thing at, supposedly the same file location.

A:

It seems that you handle your application settings in an uncommon way, as it is not allowed/possible to save settings to the application-config-file (xxxx.exe.config) by using the default way via ApplicationSettings.
Fix this behaviour and only try to save settings using the user scope and there will be no need to change permissions under 'Program Files (x86)' to save something there.
If files that you installer package should take care of were changed by the user you run into trouble if you try to update them, as these files are no more under windows installer control - so you have to avoid this.

