For this question, I have a pc in a workgroup.
Three user id's have been defined.
This is a virgin Windows 7 X64 machine.
No policies modified. Ever.
All possible updates applied.
What I am try to do is: Determine if the currently logged account has Admin right or privileges.
I have seen several examples on the web of thing that might work.
I IE: Running "OPENFILES" and monitor the result.
Running "Net Session" and monitoring the result code.
Or even trying to read HKEY_USERS\S-1-5-19\Environment\TEMP registry value. (Just attempt to read it.)
All three result in fallers (a good thing) if the account in use at the time (Standarduser) is a standard user
And all three result is the positive, if the account in use at the time ((Administrator) is THE local Administrator account.
But all three fail, if the account in use at the time (Adminmember), is a member of the local Administrators group.
This really confuses me.
My goal is to identify if the currently logged on user account has Administrative rights or privileges or not.
Thanks for any ideas.