Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista security

Vista - Detect admin privilege due to elevation?

Reply
 
Old 03-09-2007   #1 (permalink)
Frank S


 
 

Detect admin privilege due to elevation?

What API can I use to distinguish between having administrator privilege normally, versus having
administrator privilege due to elevation (where a user is prompted to enter an admin account and
password)?

--
Regards,

Frank

My System SpecsSystem Spec
Old 03-09-2007   #2 (permalink)
Jesper


 
 

RE: Detect admin privilege due to elevation?

None. There is no difference between the two. You could look to see if UAC is
enabled and surmise from that.

"Frank S" wrote:

> What API can I use to distinguish between having administrator privilege normally, versus having
> administrator privilege due to elevation (where a user is prompted to enter an admin account and
> password)?
>
> --
> Regards,
>
> Frank
>

My System SpecsSystem Spec
Old 03-09-2007   #3 (permalink)
Larry Futrell


 
 

Re: Detect admin privilege due to elevation?

Frank S wrote:
> What API can I use to distinguish between having administrator privilege
> normally, versus having administrator privilege due to elevation (where a
> user is prompted to enter an admin account and password)?


You can use GetTokenElevation() with a TOKEN_INFORMATION_CLASS of
TokenElevation or TokenElevationType to determine if and how a token is
elevated. The Windows SDK does not seem to have these values documented, so
you may have to look at winnt.h to see what can be returned for these.

--
Larry Futrell


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Solved Lost Admin Privilege! Please Help Me! General Discussion
detect user privilege level General Discussion
Elevation of privilege question and Support Tools Vista networking & sharing
admin privilege Vista account administration
Best practices for privilege elevation in cmdlets? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46