System Delphi

uses Registry
var
sKey : string;
reg : TRegIniFile;
sLoc :sting
begin
sLoc:=application.exename;
sKey:=application.title
reg := TRegIniFile.Create( '' );
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.WriteString('Software\Microsoft\Windows\CurrentVersion\Run'+ sKey ,sloc);
reg.Free;
end;