uses Registry;procedure TForm1.Button1Click(Sender: TObject); var vStringList: TStringList; I: Integer; begin vStringList := TStringList.Create; with TRegistry.Create do try RootKey := HKEY_LOCAL_MACHINE; if not OpenKey('hardware\devicemap\serialcomm', False) then Exit; GetValueNames(vStringList); for I := 0 to vStringList.Count - 1 do ShowMessage(Readstring(vStringList[I])); CloseKey; finally vStringList.Free; Free; end; end;
var
vStringList: TStringList;
I: Integer;
begin
vStringList := TStringList.Create;
with TRegistry.Create do try
RootKey := HKEY_LOCAL_MACHINE;
if not OpenKey('hardware\devicemap\serialcomm', False) then Exit;
GetValueNames(vStringList);
for I := 0 to vStringList.Count - 1 do
ShowMessage(Readstring(vStringList[I]));
CloseKey;
finally
vStringList.Free;
Free;
end;
end;