Windows 7的文件虚拟化 [英] File virtualization Windows 7

查看:79
本文介绍了Windows 7的文件虚拟化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有以下情况...

对于我在合同桥上打球的俱乐部,我还管理计算机设置,该计算机设置用于从分数输入框收集分数并在比赛结束时计算分数.

安装在此计算机上的程序还会保存俱乐部会员列表以及一些地址信息,例如电子邮件地址等.

为了能够向这些人发送俱乐部电子邮件,我编写了一个小程序来访问此成员列表,并使用emailaddresses发送电子邮件.成员列表位于访问数据库文件中(例如,Members.mdb,与程序的安装文件夹一起存储在程序文件"下).

现在出现了问题...在Windows XP下运行此电子邮件程序根本不是问题.它打开数据库,获取电子邮件地址并发送电子邮件.最近,对Windows 7进行了升级.评分程序运行起来像微风,但是突然之间,电子邮件发件人程序不再找到Members.mdb文件.事实证明,这是一个称为文件虚拟化"的功能,因为该文件仍然存在,但是放置在其他位置(AppData .... VirtualStore ... Program Files ... etc),但是该文件夹是用户特定的,因此当然不应进行硬编码.

问题是:是否存在(标准化)访问本应位于受保护(程序文件)区域中但实际上存储在AppData下虚拟副本文件夹中的文件的方式?我的自写程序进入实际的Program Files文件夹,而计算程序将文件存储在虚拟化"位置.

任何帮助,将不胜感激!

问候perry

Hi all,

I have the following scenario...

For the club that I play contract bridge at I also manage the computer setup which is responsible for gathering scores from the score entry boxes and calculating scores at the end of a competition drive.

The program installed at this computer also holds the list of members of the club along with some address information such as email adresses etc.

To be able to send a club email to those people, I wrote a little program that accesses this member list and uses the emailaddresses to send the email. The member list lives inside an access database file (let''s say Members.mdb, stored along with the program''s installation folder under "Program Files").

Now comes the problem... Running this email program under Windows XP is not an issue at all. It opens the database, fetches the emailaddresses and send the emails. Recently, There was an upgrade to Windows 7. The score program runs like a breeze, but suddenly, the email sender program does not find the Members.mdb file anymore. THis turns out to be a feature called "File Virtualization", since the file still exists, but is placed in a different location (AppData....VirtualStore...Program Files...etc) This folder is however user specific, so should not be hardcoded ofcourse.

The question is: Is there a (standardized) way to access files that are supposed to be in the protected (Program Files) area, but were actually stored in their virtual counterpart folders under AppData? My selfwritten program goes to the actual Program Files folder, while the calculation program stores the file in the "virtualized" location.

Any help would be appreciated!

Regards, perry

推荐答案

您是否正在寻找 Environment.GetFolderPath [ ^ ]?

问候
Espen Harlinn
Are you looking for Environment.GetFolderPath[^]?

Regards
Espen Harlinn


一个hack-fix将是使用UAC提升来运行旧的Score-app-这意味着它将能够读/写到Program Files文件夹(这是您所需要的)应用读取).


--------

跟进您的评论.

您的程序在这里正常运行.这不是旧程序.如果您希望与旧程序具有相同的行为,请将您的应用程序编译为32位并在没有UAC提升的情况下运行它,它也将遇到虚拟化(如旧版应用程序).
One hack-fix would be to run the old Score-app with UAC elevation - which means it will be able to read/write to the Program Files folder (which is what your app reads from).


--------

Follow-up to your comment.

Here your program is working correctly. It''s the old program that is not. If you want identical behavior to the old program, compile your app as 32 bit and run it without UAC elevation and it will encounter virtualization too (like the older app).


这篇关于Windows 7的文件虚拟化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆