Admin rights 
Author Message
 Admin rights


how can I check if the current User got Admin rights or not?


Sun, 23 May 2004 21:40:18 GMT  
 Admin rights


My name is Jian-Wei Yu. Thank you for using the Microsoft VB Newsgroups.

You can check if he is a member of Administrator group:

Please reference Active DS Type Library, and test the following code:

Dim objIADs As IADsUser
Dim objGrp As Object 'IADsGroup

Private Sub Command1_Click()

Set objIADs = GetObject("WinNT://Server/UserName,user")

For Each grp In objIADs.Groups
Debug.Print grp.Name 'List the group

End Sub

Hope it helps. If you have any questions, please reply to this post.

Best Regards,  

Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Tue, 25 May 2004 17:23:22 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Defrag without admin rights + SFImpersonator

2. Finding out if user has NT Admin rights

3. Verify NT domain Admin right

4. Script with admin rights

5. Running a vb script with admin rights

6. Unable to register OCX in 2000 users with no admin rights

7. need admin rights to add controls

8. Temporary grant Admin rights in prog.

9. Grant Admin Rights to an Application?

10. Determine Local Admin rights ?

11. Granting Admin Rights on Lock-down PC

12. Admin help with regular user rights...


Powered by phpBB® Forum Software