'The SID is stored in a hexadecimal representation of the binary SID 'so we convert it and store it in a byte array tmp = Len(strSID) / 2 - 1 ReDim bByte(tmp) As Byte For i = 0 To tmp - 1 bByte(i) = CInt("&h" & Mid(strSID, (i * 2) + 1, 2)) Next 'Allocate space for the strings so the API won't GPF strName = Space(64) strDomain = Space(64) 'Get the NT Domain and UserName 'Note: This can't be done from VBScript directly 'because VBScript doesn't support making the 'LookupAccountSid API call ret = LookupAccountSid(vbNullString, bByte(0), strName, Len(strName), strDomain, Len(strDomain), iType