Can I run a program on start-up before anyone has logged in? So that, for example, q-torrent and some other programs start again after unexpected shutdown (like power failure or similar) and automatically do their tasks. And also would the following program be seen in task manager like is running by system or user.
You can launch your app as service . Services are app which the windows start from the startup even before log in screen comes .
You can follow this tutorial to do so
You can use Task Scheduler to achieve this. Press Win+R and execute taskschd.msc there. Create a task and set an option "Run whether user is logged or not". Create a trigger "At startup". Add an action with path to your program or bat file, put arguments and startup directory if needed. You'll have to enter your credentials when you click OK.
Some words about the option "Run whether user is logged or not". This option is available when you run your task as your current user or some another user on the machine. But you can specify to run the task as SYSTEM to grant maximum privileges and "Run whether user is logged or not" will be disabled because SYSTEM is always online. But I don't recommend to use SYSTEM if you actually don't need such high privileges.
My example: I have gitbucket server that works like that. I created bat file with the following content:
java -jar gitbucket.war --gitbucket.home="D:\gitbucket\home" > stdout.log 2> stderr.log
So, I put path of the bat file in the field "Program/script" (D:\gitbucket\gitbucket.bat) and its directory in the field "Start in (optional)" (D:\gitbucket). All arguments are inside bat, so I don't need them in the field "Add arguments (optional)".