Does anyone know of a way to check local group membership of a domain user or group? I need to install a program but the logged on user must have at least local power user rights. I can check for domain group membership but I don't know how to check what local rights they have.
domain = "domainname"
usrnme = "username"
groupname = "Administrators"
flgIsMember = false
Set userObj = GetObject("WinNT://" & domain & "/" & usrnme & ",users"
For Each grp In userObj.Groups
msgbox grp.name
If grp.Name = groupName Then
flgIsMember = True
Exit For
End If
Next
IsMember = flgIsMember
msgbox ismember
Set userObj = nothing
Any ideas I could try will be appreicated.
Thanks
domain = "domainname"
usrnme = "username"
groupname = "Administrators"
flgIsMember = false
Set userObj = GetObject("WinNT://" & domain & "/" & usrnme & ",users"
For Each grp In userObj.Groups
msgbox grp.name
If grp.Name = groupName Then
flgIsMember = True
Exit For
End If
Next
IsMember = flgIsMember
msgbox ismember
Set userObj = nothing
Any ideas I could try will be appreicated.
Thanks