usesRegistry; // Количество вложенных ключей и значений procedure
TForm1.Button1Click(Sender: TObject); const
sKey = 'SOFTWAREMicrosoftWindowsCurrentVersion'; var
rReg: TRegistry; ki: TRegKeyInfo; begin
rReg := TRegistry.Create; with
rReg do
begin
RootKey := HKEY_LOCAL_MACHINE; if
KeyExists(sKey) then
begin
OpenKey(sKey, false); GetKeyInfo(ki); CloseKey; lbSubkeys.Caption := IntToStr(ki.NumSubKeys); lbValues.Caption := IntToStr(ki.NumValues); end
; end
; rReg.Free; end
;