1 procedure TForm1.Button2Click(Sender: TObject); 2 var 3 Reg:TRegistry; 4 Val:TStrings; 5 ii:System.Integer; 6 TmpStr:String; 7 begin 8 Reg:=TRegistry.Create(); 9 Val:=TStringList.Create(); 10 Try 11 Reg.RootKey:=HKEY_CURRENT_USER; 12 if Reg.OpenKey('SoftwareTencentPlatForm_Type_List1',False) then 13 Reg.GetKeyNames(Val); 14 //Memo1.Lines.AddStrings(Val); 15 if Val.Count>0 then 16 begin 17 for ii:=0 to Val.Count-1 do 18 begin 19 Reg.CloseKey;if Reg.OpenKey('SoftwareTencentPlatForm_Type_List'+Val.Strings[ii],False) 20 then 21 begin 22 TmpStr:=Reg.ReadString('TypePath'); 23 if TmpStr<>'' then 24 Showmessage(TmpStr); 25 end; 26 end; 27 end; 28 Finally 29 Reg.Free; 30 Val.Free; 31 end; 32 end;