Lonk,

The language independant idea is great:
- The SidToName() part

So if my original code should work worldwide (All contries, also Suomi) it would be:
code:
If IsLocalAdmin('Domain Users')
'Yes is local admin'
Else
'No is NOT local admin'
EndIf

? Get $x

Function IsLocalAdmin($UserOrGroup)

$oGroup = GetObject("WinNT://./SidToName('S-1-5-32-544'),group")
$oChk = GetObject("WinNT://" + @Domain + "/" + $UserOrGroup)
If VarTypeName($oChk) = "Object"
If $oGroup.IsMember($oChk.adspath)
$IsLocalAdmin = 1
EndIf
EndIf

EndFunction

-Erik

[ 29. August 2003, 01:37: Message edited by: kholm ]