Re: Detect if currently logged on user has administrator priviledges.
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 21:27:07 +0200
>From W2K enough CheckTokenMembership() only
http://support.microsoft.com/default.aspx?scid=kb;en-us;118626
Arkady
"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:exTHwEIYFHA.3464@xxxxxxxxxxxxxxxxxxxxxxx
> OpenProcesToken, GetTokenInformation with TokenGroups,
> IsWellKnownSid with WinBuiltinAdministratorsSid, for each
> returned SID. Use WinAccountDomainAdminsSid if you want
> to check for a domain admin.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@xxxxxxxx
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Dave" <davenospam@xxxxxxxxxxxx> wrote in message
> news:OWeu4xHYFHA.3032@xxxxxxxxxxxxxxxxxxxxxxx
>> Hello,
>>
>> I'm writing an application which must be run with administrator
>> priviledges.
>> How can I detect this from within the application? The code is all C++
>> and
>> once I've got the username I can use NetUserGetInfo to determine if it
>> has
>> admin rights. Getting the username is escaping me at the moment though.
>>
>> All help appreciated.
>>
>> Dave.
>>
>>
>
>
.
- References:
- Detect if currently logged on user has administrator priviledges.
- From: Dave
- Re: Detect if currently logged on user has administrator priviledges.
- From: Alexander Nickolov
- Detect if currently logged on user has administrator priviledges.
- Prev by Date: Computing SIDs using usri3_user_id & grpi2_group_id
- Next by Date: Re: how to get process id for a connection under w2k environment
- Previous by thread: Re: Detect if currently logged on user has administrator priviledges.
- Next by thread: NetLocalGroupGetMembers killing lsass.exe, leading to error 64 on NT4 server
- Index(es):
Relevant Pages
|
Loading