We have an application that is trying to write to the Access database (.mdb) in the C: \ ProgramData \ folder. On computers with UAC enabled, we find that access to the database fails because it seems that it cannot create a lock file. Apparently, by default (and possibly due to UAC), users (including administrators) are not allowed to write to the default application folder.
We thought that granting full permissions to the Users group to this folder would fix the problem, but it doesn’t matter. Even giving full control to “Everything” still doesn't help. The only thing that fixes the problem seems to be to move the database to another folder (for example, C: \ applicationname), which is not best practice or it runs the application as administrator, changing the shortcut.
How can we make it possible for ordinary users to write (and create files) in the C: \ ProgramData \ folder? Or are we using this folder incorrectly? I got the impression that this is the right place to host the general program data (for all users), and many other applications seem to place their data on my computer.
Update:
I found that a cloned copy of the database was placed in the following folder: C: \ Users \\ AppData \ Local \ VirtualStore \ ProgramData \
If I delete this folder, the application will work fine. Why was this folder created? Can i prevent this? Maybe due to the fact that the installer does not give the appropriate rights for the Users group in the folder in C: \ ProgramData \?
Nickg source share