Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

Detect admin privilege due to elevation?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-09-2007   #1 (permalink)
Frank S
Guest


 

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
Guest


 

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
Guest


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved Lost Admin Privilege! Please Help Me! eldron General Discussion 20 08-12-2008 01:09 PM
detect user privilege level mjblood General Discussion 0 05-27-2008 08:57 AM
Elevation of privilege question and Support Tools JCB Vista networking & sharing 1 08-03-2007 06:36 AM
admin privilege Ravi Vista account administration 2 07-05-2007 12:41 PM
Best practices for privilege elevation in cmdlets? Alex K. Angelopoulos [MVP] PowerShell 5 09-29-2006 10:35 AM


Vistax64.com 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 2005-2008

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 47 48 49 50 51