[TRUCO DELPHI] Determinar si mi aplicacion esta corriendo en la Cuenta SYSTEM.
delphi
function OnSystemAccount(): Boolean; const cnMaxNameLen = 254; var sName: string; dwNameLen: DWORD; begin dwNameLen := cnMaxNameLen - 1; SetLength(sName, cnMaxNameLen); GetUserName(PChar(sName), dwNameLen); SetLength(sName, dwNameLen); if UpperCase(Trim(sName)) = 'SYSTEM' then Result := True else Result := False; end;
Saludos!