Determine if "this" process is running with administrative privileges

  • Follow


There's a good API to determine if the current user is a member of the 
Administrator's group, i.e. IsUserAnAdmin(), but is it possible to determine 
if "this" process is running with administrative privileges? 


0
Reply nki00 6/15/2010 8:29:30 AM

Hello nki00,

On 6/15/2010 10:29 AM, nki00 wrote:
> There's a good API to determine if the current user is a member of the
> Administrator's group, i.e. IsUserAnAdmin(), but is it possible to determine
> if "this" process is running with administrative privileges?
>
>

Open the process token using the OpenProcessToken  API and feed it to 
the CheckTokenMemberShip API.

-- 
S
0
Reply Stefan 6/15/2010 8:51:48 AM


> On 6/15/2010 10:29 AM, nki00 wrote:
>
> > There's a good API to determine if the current user is a member of the
> > Administrator's group, i.e. IsUserAnAdmin(), but is it possible to determine
> > if "this" process is running with administrative privileges?

OpenProcessToken
GetTokenInformation
0
Reply ScottMcP 6/15/2010 2:21:19 PM

2 Replies
578 Views

(page loaded in 0.04 seconds)

Similiar Articles:













7/23/2012 3:06:40 PM


Reply: