HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
You can name the key anything you like, and specify a command line to another executable or to a dos command made passed to command.com
~~~~~~~~~~~~~~~~~~~~~~~~~
uses Registry;
procedure TForm1.Button1Click(Sender: TObject) ;
var reg: TRegistry;
begin
reg := TRegistry.Create;
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.LazyWrite := False;
reg.OpenKey(
'Software\Microsoft\Windows\
CurrentVersion\RunOnce',
False) ;
reg.WriteString('Delete Me!',
'command.com /c del Dummy.txt') ;
reg.CloseKey;
reg.free;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» Select a block of code by column
« Convert the First Character in an Edit Box to Uppercase

