Ajuda plz!! [Registro do windows] - Delphi 7

Started by Hacker Xtreme, 07 de October , 2006, 06:09:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hacker Xtreme

Pessoal... estou com uma dúvida como mostrar em um ListBox todas as chaves contidas no registro tipo a chave Run que é a de inicilização... queria montar um programa que adiciona e remove as chaves só que não sei como colocar pra mostrar as chaves contidas tipo:

Emule.exe
MSN Messenger.exe

Se alguém puder me ajudar agradeço!  ;D

Hacker Xtreme

Pode trancar o tópico... já fui ajudado pelo Whit3_Sh4rk vlw!!

pra quem quiser:

Procedure TForm1.FormCreate(Sender: TObject);
var
  Reg: TRegistry;
  Val:TStringList;
  I: Integer;
  Lista : TStrings;
begin
  Reg:=TRegistry.Create;
  Val:=TStringList.Create;
  Reg.RootKey:=HKEY_LOCAL_MACHINE;
  if not Reg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',False) then
  ShowMessage('Chave de registro não encontrada!')
 else
begin
  Reg.GetValueNames(Val);
begin
  ListBox1.Items.Clear;
end;
  for I:=0 to Val.Count-1 do
begin
  ListBox1.Items.Add(Val.Strings);
end;
end;
end;



Por Whit3_Sh4rk - vlw!! ;D