PC Review


Reply
Thread Tools Rate Thread

Detect admin privilege due to elevation?

 
 
Frank S
Guest
Posts: n/a
 
      9th Mar 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVzcGVy?=
Guest
Posts: n/a
 
      9th Mar 2007
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
>

 
Reply With Quote
 
Larry Futrell
Guest
Posts: n/a
 
      9th Mar 2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Elevation of privilege question and Support Tools =?Utf-8?B?SkNC?= Windows Vista Networking 1 3rd Aug 2007 12:36 PM
Code to detect UAC state and elevation on Vista Tim Anderson Microsoft C# .NET 0 22nd Apr 2007 06:17 PM
Privilege elevation not sticking =?Utf-8?B?RiBMYXJyZXk=?= Microsoft Windows 2000 Security 3 1st Oct 2004 06:17 PM
Admin privilege how? SnakeS Microsoft C# .NET 1 29th Jul 2004 12:12 PM
Deny Domain Admin privilege to local admin BG Windows XP General 2 23rd Oct 2003 02:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.