|
-
Nov 23rd, 2006, 10:02 AM
#1
Thread Starter
Member
[RESOLVED] XP Log-in account
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.
-
Nov 24th, 2006, 09:26 AM
#2
Re: XP Log-in account
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
-
Nov 25th, 2006, 11:50 PM
#3
-
Nov 27th, 2006, 06:43 AM
#4
Thread Starter
Member
Re: XP Log-in account
Thanks guys, problem solved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|