Start an application at system start without login

You need to separate your application in two.

To allow it to run without a user session, you need a windows service. That should handle all the background stuff. You can then register the service and set it to start when the system starts.

To allow it to have a UI, and show up in the notification area, you need a windows application. This will be in autostart as usual, and will communicate with the service - for example, over named pipes.

While it is still (barely) possible to run an UI application without a user session, it's only maintained for backwards compatibility, and already shows a lot of problems. It will likely be removed altogether in the future, because it breaks quite a few contracts. Do not rely on hacks like this.


You need to run your program as a Windows Service. One way of doing it is using the sc.exe program:

> sc create <new_service_name> binPath= "c:\myapp\myapp.exe"

You can read about it here.


I also used the task scheduler to create the application at system startup. It should be noted that if you want to use for mining, you have to disable an option in "settings" where it says that if the application lasts more than three days in a row it will end.

task manager settings

It really works wonderfully!


I successfully added the application by using task schelduler on startup. Login and logout will not quit the application but no symbol is shown. Please add details to my side questions and I'll mark your answer as the accepted one.

Edit: Ended up using this one. If I have to configure, I stop the application in task manager and start it again by link. After that I quit the application and restart it by task scheduler manual start.