文件夹进行虚拟化

文件夹进行虚拟化

本文介绍了为什么在 MS Vista 中对 ProgramData 文件夹进行虚拟化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我修改了一个应用程序以考虑 VISTA 中的 UAC.所以,现在,.mdb(JET 或 Access 文件)位于 ProgramData\MyApp\

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\

我意识到当我的应用程序第一次读取数据库时,它是从那个位置读取的...但是当我的应用程序写入数据库时​​...文件被虚拟化并转到 Users\MyUser\AppData\Local\VirtualStore\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.

我的应用程序正在运行,但如果我继续这种方式,数据库将基于每个用户,我们真的需要与 PC 中的所有用户共享数据库.

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.

我认为在 ProgramData 文件夹下写入不会触发虚拟化机制.

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

我缺少什么?

我需要为 ProgramData 下的 MyApp 文件夹设置权限??

如何在安装时做到这一点?

谢谢大家...

更多信息:使用 VS Setup Project 使用 VS2003 VB.NET 开发.

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

推荐答案

您很可能需要在安装过程中为所有用户设置写入权限.

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

要测试,删除虚拟化文件夹,手动设置 ProgramData\MyApp 文件夹和文件的权限,看看是否有效.

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.

这篇关于为什么在 MS Vista 中对 ProgramData 文件夹进行虚拟化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 01:42