Autor Beitrag
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 24.06.02 14:43 
Wie finde ich heraus, ob mein Programm gerade auf dem Systemkonto läuft?
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Do 27.06.02 08:53 
Ich habes es jetzt selbst herausgefunden...

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
function OnSystemAccount(): boolean; 
var 
sName:     string; 
dwNameLen: DWORD; 
begin 
  dwNameLen := 253; 
  SetLength(sName, 254); 
  GetUserName(PChar(sName), dwNameLen); 
  SetLength(sName, dwNameLen); 
  if UpperCase(Trim(sName))='SYSTEM' then Result:=True else Result:=FALSE; 
end;