Something like this maybe: $oMyError = ObjEvent("AutoIt.Error", "ComError") If UserInGroup(@LogonDomain,@UserName,"Administrators") then msgbox(0,"Validate","User exists in specified groupname") Else msgbox(0,"Validate","User does NOT exist in specified groupname") EndIf Exit ; Check if User is in a group Func UserInGroup($Domain, $UserName, $InGroup) Local $objUser = ObjGet("WinNT://" & $Domain & "/" & $UserName) For $oGroup in $objUser.Groups If $oGroup.Name = $InGroup Th