From: nki00 on
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?


From: Stefan Kuhr on
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
From: ScottMcP [MVP] on
> 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