为什么文件被放置在“C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86)"中? [英] Why do files get placed in &quot;C:\Users\&lt;username&gt;AppData\Local\VirtualStore\Program Files(x86)&quot;?

查看:68
本文介绍了为什么文件被放置在“C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86)"中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近更新了我的 Visual Basic 6.0 应用程序,现在包含一个 exe.manifest 文件防止 UAC 虚拟化.应用此更新后,某些用户无法找到他们的数据文件(Access MDB 文件)和之后他们最终在 C:\Users\AppData\Local\VirtualStore\Program Files(x86) 中找到它的系统搜索.

I recently updated my Visual Basic 6.0 application and now include an exe.manifest file to prevent UAC Virtualization. After applying this update, some users can't find their data files (Access MDB files) and after a system search they end up finding it in C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86).

这个文件夹区域是什么以及文件如何/何时移动到这个区域?我们如何预防?我希望现在我的应用程序使用 .manifest 这不会再发生.文件是否在使用清单之前放置​​在那里,因为应用程序被放置在 UAC 虚拟化中?

What is this folder area for and how/when do files get moved to this area? How do we prevent it? I'm hoping now that my application uses a .manifest this won't happen again. Did the files get placed there before the manifest was used as the application was being placed in UAC Virtualization?

推荐答案

我的猜测是您的清单显示为 asInvoker,并且您的应用程序尝试写入程序文件.当用户在没有清单的情况下运行它时,它会写入 Program Files 的虚拟存储,这是他们后来找到一些文件的路径.当他们使用清单运行时,它根本无法写入(访问被拒绝),但是您的应用程序向他们隐藏了错误,或者他们不理解错误,因此他们没有向您提及.

My guess is that your manifest says asInvoker, and that your app tries to write to Program Files. When the users ran it without a manifest, it wrote to the virtual store for Program Files, which is the path where they found some files later. When they ran with a manifest, it failed to write at all (with access denied) but either your application hid the error from them, or they didn't understand the error so they didn't mention it to you.

短期修复 - 使用 requireAdministrator 清单.这会激怒用户,但写入会成功.长期修复 - 不要写入 ProgramFiles.有更好的每用户选项,例如 AppData.

Short term fix - use a requireAdministrator manifest. This will irritate the users but the writes will succeed. Longer term fix - don't write to ProgramFiles. There are better per-user options, like AppData.

这篇关于为什么文件被放置在“C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86)"中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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