> Fra: Christopher Schultz <ch...@christopherschultz.net>
> Seems like it would be kind of awesome to have a feature like //PS// which > would dump-out the service as a .BAT file, like: > C:> tomcat9w.exe //PS//my-service-name Yes, that would be great. And with JAVA_HOME also. Right now I have solved my upgrade task with a script which can only upgrade from Tomcat 8.5 to 9.0 As I can not see from command line which tomcat are being used, I had to look that up first. Then I also have to check if the instance is running Java 8 or Java 11. I run tomcat8w.exe to get and set Java options and memory usage. Here is the script: IF [%1] == [] ( ECHO Error EXIT /B ) SET INSTANCE=%1 SET JAVA_HOME=D:\Java\jdk1.8 rem SET JAVA_HOME=D:\Java\jdk11 SET CATALINA_HOME=D:\Apache\tomcat-8.5 SET CATALINA_BASE=D:\tomcat\%INSTANCE% %CATALINA_HOME%\bin\tomcat8w.exe //ES//%INSTANCE% PAUSE "C:\Program Files (x86)\Notepad++\notepad++.exe" %CATALINA_BASE%\conf\server.xml PAUSE NET STOP %INSTANCE% CALL %CATALINA_HOME%\bin\service remove %INSTANCE% SET CATALINA_HOME=D:\Apache\tomcat-9.0 CALL %CATALINA_HOME%\bin\service install %INSTANCE% %CATALINA_HOME%\bin\tomcat9.exe //US//%INSTANCE% ^ --Startup auto ^ --DisplayName "Apache Tomcat 9.0 %INSTANCE%" ^ --Description "Tomcat 9.0 %CATALINA_BASE% %CATALINA_HOME%" PAUSE NET START %INSTANCE% %CATALINA_HOME%\bin\tomcat9w.exe //ES//%INSTANCE% Best regards --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org