Reg:=TRegistry.Create;
with Reg do
begin
RootKey:=HKEY_LOCAL_MACHINE
//根键
OpenKey('/Software/xxx', True)
//
if not ValueExists('NetType') then
WriteString('NetType','L');
sNetType:=UPPERcase(ReadString('NetType'));
end;
Reg.CloseKey ;
Reg.Free ;
end;
如果要遍历,则要通过稍微复杂的编程