1, 怎样把HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run分支中的程序启动键值及键值数据显示在Listview1组件中? 100分请教-----------------------------------------------|
键值  ||    键值数据   ||                      |
-----------------------------------------------|
       |                |                      |
       |                |                      |
-----------------------------------------------|-给出代码2, 怎样删除其中一个启动项?给出代码

解决方案 »

  1.   

    我做的关于注册表的部分
    procedure TFrm_Logo.FormActivate(Sender: TObject);
    var
      reg:Tregistry;
      UserName:String;
    begin
      DM_Set.Tbl_User.Active:=true;
      reg:=Tregistry.create;
      reg.RootKey:=HKEY_CURRENT_USER;
      if reg.OpenKey('\Software\jxc\curruser',false)=true then
      begin
        UserName:=reg.readString('name');
        Edit1.Text:=UserName;
        Edit2.SetFocus;
      end
    end;
    要下班了,明天帮你解决;
    有问题请发信息到我的E-mail:[email protected]
      

  2.   

    procedure ReadToListView(ListTmp : TListView )
    var
      reg:Tregistry;
    begin
      reg:=Tregistry.create;
      reg.RootKey:=HKEY_CURRENT_USER;
      if reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',false)=true then
      begin
        //  循环查找项值,具体操作和一般文件夹递归读取一样
      end
    end;