Application Start Before Windows Explorer

jSherz picture jSherz · Feb 23, 2011 · Viewed 13.4k times · Source

Some installation applications stop (or appear to stop) the normal windows booting. The computer starts, the user logs in and then the installation program starts before others (like Windows explorer).

How can I replicate this behaviour in my own program?

E.g.

  • OS Boot
  • Login
  • The program runs, updates etc.
  • The rest of the programs run (e.g. windows explorer and what ever runs on startup)

Answer

vcsjones picture vcsjones · May 31, 2012

If you want to start an application before the shell starts, you can add a value to the Userinit value in the registry. In this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

There is a value named Userinit. Change it so your program is run before userinit.exe. For example, to start notepad before the shell/everything else is initialized:

C:\WINDOWS\system32\notepad.exe,C:\Windows\system32\userinit.exe

Use commas to separate the programs that should be started.

This works for Windows XP, Vista, and 7.