Prev: Question about files that start with \??\
Next: Any way to run MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT from a non-elevated process?
From: nki00 on 15 Jun 2010 04:29 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 15 Jun 2010 04:51 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 15 Jun 2010 10:21
> 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 |