cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nmsams
Level 7

Vista, UAC and Virtualization

I ran into a problem today where a user installed version 2.5.17 of our product on a Vista machine. Then they installed version 2.5.32 as a minor upgrade. However, one of the files (an .mdb) was still the old version from 17 and was not the newer version from 32. We found out that Vista has stored the old .mdb file during it's virtualization process and was using that file instead of the new one installed.

I read a few posts on using CommonAppDataFolder to avoid virtualization. How do I go about doing this? What properties do I need to change in my install in order to implement this new folder?

Also, by doing this, how will it affect my pre-Vista Windows users?

Thanks.
Labels (1)
0 Kudos
(8) Replies
nmsams
Level 7

Another Question...is there away to get around the virtualization without moving my INSTALLDIR? If I change the properties of my .mdb to Always overwrite, will that solve the problem? Or does it have to be digitally signed?

Right now, if you turn off UAC it works fine. But if you have UAC sometimes that file doesn't get updated.
0 Kudos
Stefan_Krueger
Level 9

The problem is that you are storing your mdb file in a location where the regular user doesn't have write access. Now if your application tries to write to that file, Vista redirects the write to a copy of the file it creates in a user-writebale folder.

The solution is to install the file to a user writable directory (and adjust your application accordingly).

A possible (but not recommended) workaround would be to open up the permission on the mdb file when you install it, to make it writable by everyone.
Stefan Krueger
InstallSite.org
0 Kudos
nmsams
Level 7

What if I don't need my user to have write access? Even though the file is an .mdb, it's not being used for client data. We use it to store database changes for the SQL Server databases that contain the client data. We have an application that reads information out of the mdb and updates the SQL databases accordingly. So this file just needs read access, it's never changed by the client.
0 Kudos
Stefan_Krueger
Level 9

Vista's virtualization should only be a problem if someone (a user) or something (an application) tries to write to the mdb file, but doesn't have sufficient permissions (in the case of application this means the user account in which the application is running).
Stefan Krueger
InstallSite.org
0 Kudos
nmsams
Level 7

So, that means that if I just make sure that the user is an administrator when installing a new version of my application, then everything should be fine? Because the file is not modified at any other time.
0 Kudos
Stefan_Krueger
Level 9

Yes, that's what I would expect.
Stefan Krueger
InstallSite.org
0 Kudos
Christopher_Pai
Level 16

If I'm not mistaken, Microsoft has said that this feature won't be in future operating systems.

Personally I would not even consider it as an option and just design your application to write to the correct locations.
0 Kudos
arckal
Level 2

Stefan Krueger wrote:
The problem is that you are storing your mdb file in a location where the regular user doesn't have write access. Now if your application tries to write to that file, Vista redirects the write to a copy of the file it creates in a user-writebale folder.

The solution is to install the file to a user writable directory (and adjust your application accordingly).

A possible (but not recommended) workaround would be to open up the permission on the mdb file when you install it, to make it writable by everyone.


I am also facing a similar problem, my application try to read/write a xml file. I have tried to assign permission (modify) to its folder called Resource, but no luck. However same solution works on XP but not on Vista. It always says "Access denied to path xxxxx.XML file.....". I do not know if there is another way to solve this issue or assign the permissions.
0 Kudos