Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: 编程实现以管理员方式运行

11 views
Skip to first unread message

89

unread,
Apr 28, 2009, 8:45:35 AM4/28/09
to
这个貌似没有办法

是操作系统做了限制,只能看你运行的那个人给于什么权限了


"朱波" <??@discussions.microsoft.com> 写入消息
news:86CF2B42-A4C8-44E9...@microsoft.com...
> VC++ 如何实现VISTA 系统下的exe 程序以管理员身份运行呢?

VirusReport

unread,
May 1, 2009, 8:05:19 PM5/1/09
to
CreateProcessAsUser
The CreateProcessAsUser function creates a new process and its primary
thread. The new process then runs the specified executable file. The
CreateProcessAsUser function is similar to the CreateProcess function,
except that the new process runs in the security context of the user
represented by the hToken parameter. By default, the new process is
noninteractive, that is, it runs on a desktop that is not visible and cannot
receive user input. Also, by default, the new process inherits the
environment of the calling process, rather than the environment associated
with the specified user.

The CreateProcessWithLogonW function is similar to CreateProcessAsUser,
except that the caller does not need to call the LogonUser function to
authenticate the user and get a token.

This function is also similar to the SHCreateProcessAsUserW function.

"�첨" <??@discussions.microsoft.com> д����Ϣ����:86CF2B42-A4C8-44E9...@microsoft.com...
> VC++ ���ʵ��VISTA ϵͳ�µ�exe �����Թ���Ա��������أ�


0 new messages