Easiest way to start application before login?

I would like to have an application restart automatically if a server crashes. It would have to restart without needing a user to login to an account. (run a program before login)

Based on my research I came up with a list of options

  1. Autologin to account + trigger application to start through windows service or task scheduler
  2. Wrap the application in a windows service
  3. Schedule application to be run when computer is powered on using windows task scheduler (Is this even possible?)
  4. Find a windows utility or free program that can do this

Are there any better ones? I just want the easiest solution to implement.


You can edit the local security policy to run a startup script. This runs when the system starts in 2003, 2008, XP and others. Also runs with elevated privileges

Run gpedit.msc and then go to Computer Configuration > Windows Settings > Scripts

There you will see Startup and Shutdown.


There are two ways I would do this:

The Proper Way - run the app as a service.

The Quick And Dirty Way - run the app as a scheduled task. One of the scheduling options is for when the computer starts.

Don't expect either of those solutions to work well with an app that needs to be interactive.