如何找到“请求的操作需要高程”的原因? [英] How do I find the CAUSE of "The Requested Operation Requires Elevation"?

查看:119
本文介绍了如何找到“请求的操作需要高程”的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了为Windows XP编写的程序。在XP上,它加载并运行得很好。现在我们所有的XP机器都已经退役,这个程序需要在用户模式下在Win7和Win8上运行。没有明显的功能原因,该程序应该需要管理员权限。



我解压缩源并将其加载到Visual Studio中。我将模式设置为Debug并按下F10以查看它将从何处开始。它没有。相反,它说请求的操作需要提升。



如何确定需要提升的操作?我需要绕过此操作或创建用户模式替换。



谢谢。

解决方案

除了在用户正在使用的操作系统的调试器下运行代码之外,没有其他方法可以快速简便。



现在,通常的清单是:



1)您是否在HKEY_LOCAL_MACHINE下向注册表写入值?



2)你是否试图写入程序文件下的任何文件?



3)你是否试图写入C:\的根目录中的文件?

I inherited a program written for Windows XP. On XP, it loaded and ran just fine. Now that all our XP machines have been decommissioned, this program needs to run on Win7 and Win8 in user mode. There is no obvious functional reason that this program should require administrator privileges.

I unpacked the source and loaded it into Visual Studio. I set the mode to Debug and pressed F10 to see where it would start. It didn't. Instead, it said that the "requested operation requires elevation."

How can I determine what "operation" is requiring elevation? I need to either bypass this operation or create a user-mode replacement.

Thank you.

解决方案

Other than running the code under the debugger on the O/S that your users are using, there's really no other way that's going to be quick and easy.

Now, the usual checklist is:

1) are you writing values to the registry under HKEY_LOCAL_MACHINE?

2) are you trying to write to files anywhere under Program Files?

3) are you trying to write to files in the root of C:\?


这篇关于如何找到“请求的操作需要高程”的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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