


All arguments are inside bat, so I don't need them in the field "Add arguments (optional)". 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). If you want Windows to run on startup without your entering a password for Windows, you must disable that requirement. I created bat file with the following content: java -jar gitbucket.war ="D:\gitbucket\home" > stdout.log 2> stderr.log Kernel Loading Phase The Windows Boot Loader is responsible for loading the Windows kernel ( Ntoskrnl. My example: I have gitbucket server that works like that. The normal startup sequence for Windows 7 is: Power-on self test (POST) phase. But I don't recommend to use SYSTEM if you actually don't need such high privileges. 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. This option is available when you run your task as your current user or some another user on the machine. Some words about the option "Run whether user is logged or not". Once it has finished, everything else that normally loads would be loaded - e.g. startup programs / explorer has started yet). You'll have to enter your credentials when you click OK. at 14:23 To create a program that runs before anything else has started - so the user has logged in, nothing (e.g. To run Windows PowerShell scripts first at user logon, logoff, startup, and shutdown using Registry Editor, follow these steps- to save the change.

Add an action with path to your program or bat file, put arguments and startup directory if needed. Create a task and set an option "Run whether user is logged or not". Press Win+R and execute taskschd.msc there. You can use Task Scheduler to achieve this.
