cd /d %~dp0
set cpath=%cd%
cd /d %cpath%\bin
call service.bat install
%cpath%\nircmd.exe regsetval dword "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\tomcat9\Parameters\Java" "JvmMx" "0x00000500"
sc.exe config "Tomcat9" start= auto
sc.exe start "Tomcat9"