This code should work to get all of the objects that are in the local admin group. I dont know how to tell the difference from users and groups however.
Code:
$memberfile = "%temp%\adminmembers.tmp"
If Exist ($memberfile)
Del $memberfile
Endif
Shell '%comspec% /c net localgroup administrators > '+$memberfile
$members = ArrayEnumText($memberfile)
Del $memberfile
For Each $member in $members
? $member
Next
get $
FUNCTION ArrayEnumText($TextFile)
Dim $TextHandle,$Line,$LineArray,$LineValue
$TextHandle = FreeFileHandle()
If Open ($TextHandle,$TextFile) = 0
While @Error = 0 and $trigger < 1
$Line = ReadLine ($TextHandle)
If InStr ($line, "---")
$trigger = 1
Endif
Loop
$LineValue = 0
While @Error = 0
$Line = ReadLine ($TextHandle)
If Not InStr ($line, "The command completed successfully")
ReDim Preserve $ArrayEnumText[$LineValue]
$ArrayEnumText[$LineValue] = $Line
$LineValue = $LineValue+1
Endif
Loop
$null = Close ($TextHandle)
If UBound ($ArrayEnumText) >= 0
Exit 0
Else
Exit 1
Endif
Else
Exit 1
Endif
ENDFUNCTION