行政特权问题 [英] Administrative Privileges Question

查看:113
本文介绍了行政特权问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++中,什么代码可使程序仅在管理特权下运行.有没有办法将其关闭,以便任何人都可以运行它.
?

In C++ what code makes a program run only under administrative privileges. Is there a way to turn it off so that anyone can run it.
?

推荐答案

它不是C ++语言或编译器.您需要更改链接器设置.
首先检查Linker-> Manifest设置(在VS2008 +中).

如果显示以管理员身份运行",请检查EXE的快捷方式(如果有)

确保EXE本身未从Windows资源管理器中标记为以管理员身份运行".不是使用UAC = AdminitratorRequired构建的应用程序,可以从资源管理器的EXE属性中进行更改.

检查进程的父级是否不在Admin模式下运行(如Visual Studio).

最重要的是,如果您的应用程序需要或不需要任何需要管理员模式的操作(例如LOCAL_MACHINE注册表访问,SystemRoot文件夹访问/修改)
It is not C++ language or compiler stuff. You need to change the linker settings.
First check the Linker->Manifest settings (in VS2008+).

Check the shortcut to EXE (if any), if it says ''Run As Administrator''

Ensure the EXE itself is not marked as ''Run As Admin'' from Windows Explorer. An application which wasnt built with UAC=AdminitratorRequired, CAN be changed from Property of EXE from Explorer.

Check if parent of process is NOT running in Admin mode (like Visual Studio).

And most importantly, if your application is requiring or non-requiring any action that demands Admin mode ,(like LOCAL_MACHINE registry access, SystemRoot folder access/modification)


这篇关于行政特权问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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