Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Run program not in StartUp Folder
Create a new string type record in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunImplementation of this idea is so:
procedure TForm1.Button2Click(Sender: TObject);
begin
if Edit1.Text<>'' then
begin
with TRegistry.Create do
begin
RootKey:=HKEY_LOCAL_MACHINE;
if OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',
TRUE) then
WriteString('UserProgram', Edit1.Text)
else
MessageDlg('Registry record error', mtError, [mbOk], 0);
CloseKey;
end;
end;
end;
-
More for developers