Why Virtualization on ProgramData folder in MS Vista?

这一生的挚爱 提交于 2019-12-04 11:50:28

问题


I have an app modified to take into account the UAC in VISTA. So, now, the .mdb (JET or Access file) is located in ProgramData\MyApp\

I realized that when my app reads the database for the first time it is doing it from that location... but when my app is writting to the database... the file is virtualized and goes to Users\MyUser\AppData\Local\VirtualStore\ProgramData\MyApp. From this moment on my app always go to the Virtualized location in disk.

My app is working, but if I continue this way, the database would be in a per-user basis, and we really need sharing the database with all the users in the PC.

I thought that writting under ProgramData folder would't trigger the virtualization mechanism.

What I'm missing?

I need to set the permissions for MyApp folder under ProgramData??

How can I do that on Install time?

Thanks people...

More info: Developed with VS2003 VB.NET using the VS Setup Project.


回答1:


Most likely you'll need to set write permissions for all users during installation.

To test, delete the virtualized folder, manually set the permissions on the ProgramData\MyApp folder and files and see if that works.

As for how to do that pragmatically during installation, that really depends on what technology you're using.




回答2:


I have had trouble here as well, it seems vista once is decides to virtualize the file, the only way to stop it is to delete the virtual file. The next time you use it, it will use the ProgramData folder.



来源:https://stackoverflow.com/questions/817142/why-virtualization-on-programdata-folder-in-ms-vista

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!