Can anyone help mefind the level of the person currently logged into the current windows instance via VB6 code please?
I need to know if it's an admin level user or restricted user.
Thank you.
Printable View
Can anyone help mefind the level of the person currently logged into the current windows instance via VB6 code please?
I need to know if it's an admin level user or restricted user.
Thank you.
Try and use this
VB Code:
Private Declare Function IsNTAdmin _ Lib "advpack.dll" ( _ ByVal dwReserved As Long, _ ByRef lpdwReserved As Long) _ As Long Private Sub CommandButton1_Click() Dim lngResult As Long Call IsNTAdmin(0, lngResult) Select Case lngResult Case 0 MsgBox "Not an admin" Case 1 MsgBox "You are an admin" End Select End Sub
perhaps something like that, i'm on a network at college at the moment so i do not have admin rights so i can't test to see if works properly.
Hope this helps
Jenova
Checkout this link:
How to check whether the user is an administrator
Thanks guys, problem solved.