如何在不登录当前用户的情况下以管理员身份登录执行流程. [英] how to execute process in admin login without log off in current user.

查看:69
本文介绍了如何在不登录当前用户的情况下以管理员身份登录执行流程.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的系统上有两个帐户.
一个是管理员,另一个是访客.
系统启动时,它将自动引导来宾登录.
我想开始一个需要管理员权限的进程.
如何在访客登录下以管理员用户身份启动该过程而无需注销?
我使用run as命令,但需要用户界面输入admin用户的密码.
我想要不需要任何用户界面即可注视过程的解决方案.
是否有任何Win32 API对此有用??

提前谢谢.

RJ:)

Hi,

I have two accounts on my system.
One is admin and another is guest.
When system starts it automatically boots in guest login.
I want to start one process which requires admin privileges.
How will i start that process under admin user in guest login without log off?
I used run as command but it requires user interface for entering the password for admin user.
I want the solution which does not require any user interface to staring the process.
Is there any win32 api which is useful for the same??

Thanks in advance.

RJ :)

推荐答案

如果需要管理员访问权限,UAC将通过提示您输入管理员密码来解决此问题.当然,我假设您使用的是Win7或Vista.
If it requires admin access, the UAC will take care of it by prompting you for an admin password. Of course, I''m assuming that you''re using Win7 or Vista.


您应该模拟"管理员.安全子系统在任何情况下都会要求进行身份验证.
您正在做的是-实际上-引入了安全漏洞(并使您的软件被视为恶意软件":它以用户应用程序的形式呈现,但它尝试在没有用户的情况下与用户系统进行交互对此有任何了解.)

如果我编写的应用程序甚至不问您任何问题就使用您的信用卡,您会怎么想?
You should "impersonate" the admin. And the security subsystem will in any case ask for an authentication.
What you''re doing is -in fact- introducing a security leak (and make your software to be considered "malware": it is presented as a user app, but it tries to interact with the user''s system without the user have any knowledge about that).

What do you think if I write an app that uses your credit card without even asking you anything?


尝试以下链接:

http://msdn.microsoft.com/en-us/library/ms682425.aspx [ ^ ]

我想您要CreateProcessAsUser()CreateProcessWithLogonW().
Try this link:

http://msdn.microsoft.com/en-us/library/ms682425.aspx[^]

I think you want CreateProcessAsUser() or CreateProcessWithLogonW().


这篇关于如何在不登录当前用户的情况下以管理员身份登录执行流程.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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