Author: Tomas Rutkauskas How to get a list of all network adapters of a PC Answer: Example which can be used for all other hardware, too. Doesn't seem to work for Win 2000 though. 1 uses 2 Registry; 3 4 procedure GetNetworkAdapters(const List: TStrings); 5 var 6 R: TRegistry; 7 i: Integer; 8 begin 9 List.BeginUpdate; 10 try 11 R := TRegistry.Create; 12 try 13 R.RootKey := HKEY_DYN_DATA; 14 if R.OpenKeyReadOnly('\Config Manager\Enum') then 15 try 16 R.GetKeyNames(List); 17 finally 18 R.CloseKey; 19 end; 20 for i := List.Count - 1 downto 0 do 21 if (List[i] = '') or 22 not R.OpenKeyReadOnly('\Config Manager\Enum\' + List[i]) then 23 List.Delete(i) 24 else 25 try 26 List[i] := R.ReadString('HardwareKey'); 27 finally 28 R.CloseKey; 29 end; 30 R.RootKey := HKEY_LOCAL_MACHINE; 31 for i := List.Count - 1 downto 0 do 32 if (List[i] = '') or not R.OpenKeyReadOnly('\Enum\' + List[i]) then 33 List.Delete(i) 34 else 35 try 36 if CompareText(R.ReadString('Class'), 'net') = 0 then 37 List[i] := R.ReadString('DeviceDesc') 38 else 39 List.Delete(i); 40 finally 41 R.CloseKey; 42 end; 43 finally 44 R.Free; 45 end; 46 finally 47 List.EndUpdate; 48 end; 49 end;