Run Program Before Login Screen Appears [duplicate]

Unfortunately, you can not run just any program at that stage. Only applications that use the 'native' NT API (provided by NTDLL.dll) can be run before Win32 subsystem is loaded.

To check if a program can be run at that particular stage, do the following:

  1. Run Registry Editor (regedit.exe).
  2. Navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager and locate a multi-string (REG_MULTI_SZ) entry called BootExecute.
  3. Double click the entry and Add the name of the executable you want to test excluding path. The executable must be located in %windir%\system32.
  4. Reboot.

If the program runs in the Native NT environment, you win. Otherwise, there's nothing you can do about it unless you have access to the program's source code.

Read this Technet Article for more information about Native NT application.