procedure GetKeyNames(Strings: TStrings);
procedure GetValueNames(Strings: TStrings);

解决方案 »

  1.   

    遍历注册表的每一个key,一直找到这个Item,此时取当前打开的key和item对应的vlaue即可遍历注册表与文件夹算法完全相同,而item就相当于文件,value就是取文件内容
      

  2.   

    Reg:=TRegistry.Create;
      Reg1:=TRegistry.Create;
      Reg.RootKey:=HKEY_CURRENT_USER;
      Reg1.RootKey:=HKEY_CURRENT_USER;
      try
       fString:=Tstringlist.Create;
       fString1:=Tstringlist.Create;
       Reg.OpenKey('Software\Microsoft\Windows Messaging Subsystem\Profiles\Microsoft Outlook Internet Settings',False);   Reg.GetKeyNames(fstring);
       for I:=0 to fstring.Count-1 do
       begin
            Reg1:=TRegistry.Create;
            Reg1.RootKey:=HKEY_CURRENT_USER;
            Reg.OpenKey('Software\Microsoft\Windows Messaging Subsystem\Profiles\Microsoft Outlook Internet Settings\'+fstring.Strings[i],False);
            Reg.GetvalueNames(fstring1);
            for m:=0 to fString1.count-1 do
            begin
                if fString1.Strings[m]='001e6700' then
                begin
                   getpath:=Reg.ReadString('001e6700');
                   Break;
                end;
            end;
      end;
      finally
         Reg.Free;
         Reg1.Free;
         fString.Free;
         fString1.Free;
      end;