So schwierig wars jetzt doch nicht Windows 8 zu knacken:
Delphi-Quellcode:
procedure ReadActiveUser(var PW: string);
Var
registry: TRegistry;
Begin
registry := TRegistry.Create(KEY_READ);
Try
registry.RootKey := HKEY_LOCAL_MACHINE;
registry.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI');
PW := registry.ReadString('LastLoggedOnSAMUser');
registry.CloseKey;
Finally
registry.Free;
End;
PW := StringReplace(PW, (ComputerName + '\'), '',
[rfReplaceAll, rfIgnoreCase]);
//Windows 8
PW := StringReplace(PW, ('.\'), '',
[rfReplaceAll, rfIgnoreCase]);
end;
Das wars schon, jetzt läuft alles
KUBA