Does anyone know how to install Apache Tomcat 10 silently on the commandline?
I have tried /S and it just doesn't work. It seems like nothing is running and I get no error, it just goes directly to another command prompt.
Without any arguments the installer comes up properly.
I want everything installed as default except for the windows service to be set to auto instead of manual.
                        
Installation using the Windows installer
Tomcat's Windows installer is an NSIS installer, therefore it supports the standard /S command switch.
All other standard NSIS options also work, so if your want to install it in another folder, just execute in a
cmdprompt:The only non standard command line options are:
/?which prints a nice usage message,/C=config.ini, which allows to set other variables in an*.inifile. The complete list of variables you can set can be found in the source script.Installation from zip archive
Tomcat installation sums up to:
Therefore you can download the "64-bit Windows zip" and unpack it.
The
Tomcat10.exeexecutable in thebinfolder is the executable used to install the service and it is actually a copy of prunsrv. You can find the list of command line parameters in its documentation.Instead of calling directly
prunsrv, it is easier to use theservice.batscript in the same folder:There is no "silent" switch, but all the output is done by the script itself, so you can comment it out.
Edit: Although the
service.batscript has only a couple of arguments available:some parameters can be provided through environment variables:
CATALINA_HOME,CATALINA_BASE,JAVA_HOMEandJRE_HOME,JAVA_ENDORSED_DIRSto set thejava.endorsed.dirssystem property,SERVICE_STARTUP_MODEto choose the service's startup mode betweenmanual(default),delayedorauto,JvmMsto set the initial memory pool size in MiB (default 128),JvmMxto set the maximum memory pool size in MiB (default 256).