![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
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 | |||