简体   繁体   English

Windows 7 上的 VB6 文件访问

[英]VB6 File Access on Windows 7

I installed an old VB6 app that I wrote on Windows 7. The app produces an HTML file and saves it to Program Files (x86)/{Application}/report.html .我安装了我在 Windows 7 上编写的旧 VB6 应用程序。该应用程序生成一个 HTML 文件并将其保存到Program Files (x86)/{Application}/report.html

I then installed a newer version of that app on the same machine and ran the same report.然后我在同一台机器上安装了该应用程序的更新版本并运行了相同的报告。 But when I open the new generated report.html file, I see the OLD version of that file.但是当我打开新生成的report.html文件时,我看到了该文件的旧版本。

It seems like Windows is keeping the files that were generated from the OLD version of the app and not letting the NEW version of the app overwrite them.似乎 Windows 保留了从应用程序的旧版本生成的文件,而不是让应用程序的新版本覆盖它们。

The app is running under Windows XP SP2 compatability mode as an Administrator.该应用程序以管理员身份在 Windows XP SP2 兼容模式下运行。

Are there any workarounds for this?是否有任何解决方法?

It's probably filesystem redirection at work.这可能是工作中的文件系统重定向。 Writes to %PROGRAMFILES% get transparently redirected to a per-user location.写入 %PROGRAMFILES% 会被透明地重定向到每个用户的位置。 If you run the app as an administrator, that should disable the redirection.如果您以管理员身份运行该应用程序,则应禁用重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM