Fórum Como adicionar um valor a uma chave no registro? #167782
04/07/2003
0
Quero adicionar o endereco do software ao registro ´HKEY_LOCAL_MACHINE\softwares\microsoft\windows\current_version\run´.
Estive olhando umas funcoes de manipulacao de registro da biblioteca windows mas só consegui usar uma que cria chaves e nao valores.
Nightwolf_br
Curtir tópico
+ 0Posts
04/07/2003
Skywalker
Tente esta rotina abaixo
Registro:= TREgistry.Create;
registro.RootKey:= HKEY_LOCAL_MACHINE;
registro.OpenKey(´\softwares\microsoft\windows\current_version\run´, true);
registro.WriteString(´nomedasuachave´, ´enderecodoarquivo´);
registro.free;
Gostei + 0
05/08/2003
Odirlei
Minha rotina:
procedure TForm1.Button1Click(Sender: TObject);
var
reg: TRegistry;
begin
reg:= TRegistry.Create;
reg.RootKey:= HKEY_LOCAL_MACHINE;
reg.OpenKey(´\software\microsoft\windows\currentversion\run´, false);
reg.DeleteValue(´\software\microsoft\windows\currentversion\run´);
reg.free;
end;
Onde estou errando?
Gostei + 0
05/08/2003
Rômulo Barros
procedure TForm1.Button1Click(Sender: TObject);
var
reg: TRegistry;
begin
reg:= TRegistry.Create;
reg.RootKey:= HKEY_LOCAL_MACHINE;
reg.OpenKey(´\software\microsoft\windows\currentversion\run´, false);
reg.DeleteValue(digite aqui o nome de seu ´Valor´);
reg.free;
end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)