Windows 7 - UAC - VB6 - 无法“看到"文本文件按应用程序 [英] Windows 7 - UAC - VB6 - Text File Can't Be "Seen" By Application

查看:26
本文介绍了Windows 7 - UAC - VB6 - 无法“看到"文本文件按应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 VB6 应用程序,可以读取文件扩展名为 .LIC 的简单文本文件.当一切正常时,如果文件与可执行文件存在于同一目录中,它就会读取它.如果没有,它会做其他事情.

We've got a VB6 application that reads a simple text file with a .LIC file extension. When everything is working correctly, if the file exists in the same directory as the executable, it reads it. If not, it does other stuff.

我有一个使用 Windows 7 机器的客户,如果他右键单击 EXE 并以管理员身份运行",它会看到"LIC 文件.如果他以基本用户身份运行EXE,则看不到LIC文件.

I've got a customer with Windows 7 machines, and if he right-clicks the EXE and "Runs as Administrator" it "sees" the LIC file. If he runs the EXE as a basic user, the LIC file cannot be seen.

我在 UAC 上遇到了足够多的问题,猜测 UAC 正在从某种虚拟目录运行应用程序,这就是为什么看不到 LIC 文件的原因.我的客户发誓他已关闭 UAC.

I've had enough issues with UAC to guess that UAC is running the application from a virtual directory of some sort and that's why the LIC file isn't seen. My customer swears he's turned UAC off.

有人给我指点吗?如果有办法告诉 UAC让这个应用程序在这个目录中做它想做的事情",那就太好了.这超出了我的专业知识.我一直在谷歌上搜索,直到我的手指掉下来,我找不到正确的答案.

Anyone have any pointers for me? It would be great if there was a way to tell UAC "let this app do what it wants in this directory". That's out of my expertise. I've been Googling till my fingers fall off, and I can't find the right answer.

谢谢!

推荐答案

如果你认为虚拟化正在发生(这会导致它看起来不是 Program Files),给他一个名为 foo.exe.manifest 的清单文件,其中 foo是您的可执行文件名称,让他将其与 exe 和 .lic 文件放在同一文件夹中.此清单应将所需的执行级别设置为 asInvoker.这将抑制虚拟化,因此您可以将其排除为问题的一部分.然后他可能会收到拒绝访问的错误,但这会帮助您解决问题.

If you think virtualization is happening (which would cause it to look somewhere other than Program Files), give him a manifest file called foo.exe.manifest where foo is your executable name and have him put it in the same folder as the exe and the .lic file. This manifest should set the required execution level to asInvoker. This will suppress virtualization and so you can rule that out as part of the problem. He may then get access denied errors but that will help you sort out the problem.

这篇关于Windows 7 - UAC - VB6 - 无法“看到"文本文件按应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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