1
0
cuberite-2a/MCServer/install_windows_service.cmd
Anthony Birkett 65a62601dc Use the new style command line parameters for Windows Service support.
Ignore invalid or malformed command line parameters, prevent unhandled exceptions.
NOTE: Users will need to reinstall the service, now uses "-d" instead of "/service" in the start parameters.
2015-06-01 14:41:06 +01:00

7 lines
281 B
Batchfile

rem Alter this if you need to install multiple instances.
@echo off
set SERVICENAME="MCServer"
set CURRENTDIR=%CD%
sc create %SERVICENAME% binPath= "%CURRENTDIR%\MCServer.exe -d" start= auto DisplayName= %SERVICENAME%
sc description %SERVICENAME% "Minecraft server instance"