Chkautostart:tcheckbox in the setup form;
Procedure Tfrmsetup.formcreate (Sender:tobject);
Var s:string;
_rootkey:hkey;
_localkey:string;
Begin
{$ifdef Proxy}
btnabout.enabled: =false;
{$ENDIF}
_rootkey:=hkey_local_machine;
_localkey:= ' SOFTWARE\Microsoft\Windows\CurrentVersion\Run ';
Chkautostart.checked: =registryvalueexist (_rootkey,_localkey, ' Autotvstart ', application. EXEName);
End
Procedure Tfrmsetup.chkautostartclick (Sender:tobject); When you click Tcheckbox;
Var _rootkey:hkey;
_localkey:string;
Begin
_rootkey:=hkey_local_machine;
_localkey:= ' SOFTWARE\Microsoft\Windows\CurrentVersion\Run ';
If Chkautostart.checked Then
Addoneregistryvalue (_rootkey,_localkey, ' Autotask ', application.exename)
Else
Deleteoneregistryvalue (_rootkey, _localkey, ' Autotask ');
End
Set random Start--"using Delphi to develop shared software"-15.1 task Manager