Moin,
das kannst du aus der Registry auslesen...
Delphi-Quellcode:
function GetUser:string;
var buffer:string;
buffsize:DWord;
begin
buffsize := 128;
Setlength(buffer, buffsize);
Getusername(PChar(buffer), buffsize);
Result := buffer;
end;
function GetUserIconPath(User:string):string;
var Registry:TRegistry;
begin
Registry := TRegistry.Create(KEY_READ);
try
Registry.RootKey := HKEY_LOCAL_MACHINE;
Registry.OpenKey('Software\Microsoft\Windows\CurrentVersion\Hints\'+User, False);
Result := Registry.ReadString('PictureSource');
finally
Registry.Free;
end;
end;
und ein Beispielaufruf:
ShowMessage(GetUserIconPath(GetUser));
MfG
Thorsten