Re: How to know if a user has administrative privileges

Tech-Archive recommends: Fix windows errors by optimizing your registry



Heinz wrote:

I need to find out if the current user is an administrator.

Looking up group-memberships seems to be one way, but if I have to follow nested groups it will become difficult....
Also, when using group memberships it will be language dependent ("Administrators" is a different group in French, Spanish, German etc....)

Another approach may be to simply try to do something that only an administrator is allowed to do....
Any idea what this could be and how to code it in VBS ?

Perfect would be a solution that work withs XP,Vista and 2003.

Another solution is IsAdmin.exe

http://www.westmesatech.com/wast.html

Site note: It can also detect if the current user is a member of Administrators but the group is not enabled (e.g., when UAC is active on Windows Vista and later).

--
Bill Stewart
.



Relevant Pages

  • Re: file sharing only works for some files, not all
    ... If you now open another Command Prompt and type this ... Local Group Memberships *Administrators *Debugger Users ... Check your NTFS permissions, check your ...
    (microsoft.public.windowsxp.general)
  • Re: Account question
    ... Don't let the local user set the group memberships of the group by setting the Restricted Groups. ... To do a quick takeover, set up an OU and apply a restricted group to it for administrators and throw the workstation ... > Suppose a user removed every account except his local username from their> local Administrators group of their Windows XP workstation. ...
    (microsoft.public.win2000.security)
  • Re: Ownership of copied files
    ... Your report tells me that Administrators have full access ... Forum text.txt) and it returned the following: ... User profile ... Local Group Memberships *Administrators ...
    (microsoft.public.windows.file_system)