PDA

View Full Version : Best Location For Shared User Data - Admin Seeing Different Versions



rpotash
01-20-2015, 03:25 PM
Our application utilizes an Access MDB file which it queries to retrieve various operating parameters. There is a table in the file which stores the version number. Data is only read by the application. On startup our application reads the version from table. Our installer places the file in the Program Files folder with the Always Overwrite set. The problem we are having is on some systems, we can install a later version of our program, it starts-up correctly and reports the correct MDB file version. If I exit the application and re-start it, it will then always report a previous version of the file. If I run the application as an Admin it always reports the correct version. I've enabled viewing every type of file in Windows but can't find the previous copy it is using when not being run as an Admin. All users should see the same file version.

1. Is the better solution to place the file in the CommonAppDataFolder?
2. For my own knowledge, where Windows is finding the previous version of the file?

Thanks,
Rich...

MichaelU
01-21-2015, 09:30 AM
It's hard to tell from what you've posted, but my guess is that your app isn't marked as compatible with Vista, and when it tries to write to Program Files without permissions to do so, it's being redirected. You can look in %LOCALAPPDATA%\VirtualStore\... to see if your file is showing up there.

You can choose a better location for the file, such as the CommonAppDataFolder as you mention. Or you can modify the permissions when you install the file; we expose that option in Professional and higher editions. Typically I would prefer the first choice, but it may require modifying your application to look in the new location.

rpotash
01-24-2015, 08:58 AM
I can modify our app for the CommonAppDataFolder. I am using Express. Is there any way I can create our sub-folder and set the permissions with this version? If not, then won't I have the same problem where Windows will virtualize the CommonAppDataFolder\MyCompany\MyProduct folder?