procedure TForm1.Button1Click(Sender: TObject);
var
UserList: Variant;
Index: Cardinal;
begin
UserList := CreateOleObject('Shell.Users');
for Index := 0 to UserList.length - 1 do
MessageBox(Handle, PChar(string(UserList.Item(Index).setting['LoginName']) + #9 + IntToStr(UserList.Item(Index).setting['AccountType'])), nil, 0);
end;