Code:
var
IsWinNT:boolean;
const
HKLM_CURRENT_VERSION_WINDOWS = 'SOFTWARE\Microsoft\Windows\CurrentVersion';
HKLM_CURRENT_VERSION_NT = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion';
// trebaš dobiti verziju windowsa, odnosno platformu, pa ako je NT korisiš drugu konstantu inače koristiš prvu
function REG_CURRENT_VERSION: string;
begin
if IsWinNT then
Result := HKLM_CURRENT_VERSION_NT
else
Result := HKLM_CURRENT_VERSION_WINDOWS;
end;
{$IFDEF MSWINDOWS}
function GetRegisteredCompany: string;
begin
{ TODO : check for MSDN documentation }
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, 'RegisteredOrganization', '');
end;
function GetRegisteredOwner: string;
begin
{ TODO : check for MSDN documentation }
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, 'RegisteredOwner', '');
end;