AutoRun • Interface


TAutoRunMethod = (
  rmStartup,
  rmStartupAlt,
  rmStartupCommon,
  rmStartupCommonAlt,
  rmRegistry,
  rmRegistryOnce,
  rmRegistryCommon,
  rmRegistryCommonOnce);
Type of autorun method. All "Startup" modes place LNK file into user's or common startup folder. "Registry" modes add autorun item under Run or RunOnce key in the HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE (for "Common") section of the system registry.
function GetAutoRunCustom(M: TAutoRunMethod; KeyName: string): Boolean;
Returns True if the passed autorun method is activated for passed KeyName. "Startup" methods uses KeyName as a name of LNK file, "Registry" methods uses it as a registry key name.
procedure SetAutoRunCustom(M: TAutoRunMethod; KeyName,FileName,Parameters: string);
Sets autorun for the passed method type. "Startup" methods uses KeyName as a name if LNK file, "Registry" methods uses it as a registry key name. FileName is a name of file to run, Parameters passed as a run parameters.
procedure DeleteAutoRunCustom(M: TAutoRunMethod; KeyName: string);
Deactivates autorun for the passed method and KeyName. "Startup" methods uses KeyName as a name of LNK file, "Registry" methods uses it as a registry key name.
function GetAutoRun(M: TAutoRunMethod): Boolean;
Returns True if the passed autorun method is activated for current executable file. "Startup" methods uses KeyName as a name of LNK file, "Registry" methods uses it as a registry key name. Application.Title is used as a KeyName. If the Applicaton.Title is empty, the name of current executable file is used (without extension).
procedure SetAutoRun(M: TAutoRunMethod; Parameters: string);
Sets autorun of current executable file for the passed method type. "Startup" methods uses KeyName as a name if LNK file, "Registry" methods uses it as a registry key name. Application.Title is used as a KeyName. If the Applicaton.Title is empty, the name of current executable file is used (without extension).
procedure DeleteAutoRun(M: TAutoRunMethod);
Deactivates current executable file's autorun for the passed method. "Startup" methods uses KeyName as a name of LNK file, "Registry" methods uses it as a registry key name. Application.Title is used as a KeyName. If the Applicaton.Title is empty, the name of current executable file is used (without extension).