Any of those help Program Files (x86) required administrative permission to write to. So does changing the permissions, which is why SetAccessControl fails. There's really no way around that. If you want to have your configuration file writable by the application, then you might consider changing the permission of the configuration file during installation of the program when you do have administrative access. I would instead however recommend putting your configuration file somewhere in the user's profile, which is writable by default for all users, like in %LOCALAPPDATA%.