One of my hobbies is wandering around in the lovely realm that is Minecraft. I am an admin of a world for a small group of my friends. I have a modest file server that runs 24/7 already, so I thought “why not?” and put Minecraft Server on there. One of the things that immediately annoyed me is that if I just run the server executable (e.g. start it in a Remote Desktop session), I would have to leave my server account logged in permanently. That doesn’t fly with me so I had to figure out a way to get the game to run without me being logged in.
After much disappointing searching on Google for things like “run program as a service” and “use system account to run program in Windows” I decided to do some sleuthing around on my own machine. I found a pretty simple way to do it as well. Keep in mind this can work for other programs, but I am using Minecraft as the example.

The next step is to click “Create Task…” in the right-hand Action pane.
From this window you first want to click on the “Change User or Group” button, enter “System” in the text box in the dialog and then click OK.
After that is done, click on the Triggers tab at the top of the Create Task dialog and Add a new Trigger. In the drop down for “Begin the task” select “At Startup” and then click OK.
When finished with creating the Trigger, click on the Actions tab at the top of the Create Task dialog and Add a New Action. Select “Start a Program” from the Action drop down menu and in the text box for “Program/Script'”, enter the path to the Minecraft_Server.exe executable. I’d also recommend setting the “Start in” field to the same directory as the executable. Then click OK.
Finally, go ahead and click OK on the Create Task dialog and voila! You should now have the Minecraft_Server.exe start up under the System account when your machine boots. To test your new scheduled task, you can right-click on it in the Task Scheduler Library and select “Run”.
With this setup I don’t have to leave a Remote Desktop session idling or Lock the server session instead of Logging Out my Administrator account. Minecraft will keep running on the system while the server itself is powered on.





0 comments:
Post a Comment