Entering string value in Windows registry

Hi!

How can I enter a new string value in Windows' registry (of course with a Delphi application, not manually) ?

Thanx
xmaryAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
EpsylonConnect With a Mentor Commented:
For example:

var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True)
    then Reg.WriteString('MyApp','"' + ParamStr(0) + '"');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;


Regards,

Epsylon.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.