Each command parameter is prefixed with --.
If the command line is prefixed with ++ then it's value will
be appended to the existing option.
If the environment variable with the same name as command line parameter but
prefixed with PR_ exists it will take precedence.
For example:

set PR_CLASSPATH=xx.jar

is equivalent to providing

--Classpath=xx.jar

as command line parameter.

ParameterName

Default

Description

--Description

Service name description (maximum 1024 characters)

--DisplayName

ServiceName

Service display name

--Install

procrun.exe //RS//ServiceName

Install image

--Startup

manual

Service startup mode can be either auto or manual

--DependsOn

List of services that this service depend on. Dependent services
are separated using either # or ; characters

--Environment

List of environment variables that will be provided to the service
in the form key=value. They are separated using either
# or ; characters. If you need to use either the #
or ; character within a value then the entire value must be
enclosed inside single quotes.

--User

User account used for running executable. It is used only for
StartMode java or exe and enables running applications
as service under account without LogonAsService privilege.

--Password

Password for user account set by --User parameter

--JavaHome

JAVA_HOME

Set a different JAVA_HOME than defined by JAVA_HOME environment
variable

--Jvm

auto

Use either auto or specify the full path to the jvm.dll.
You can use the environment variable expansion here.

--JvmOptions

-Xrs

List of options in the form of -D or -X that will be
passed to the JVM. The options are separated using either
# or ; characters.

--Classpath

Set the Java classpath

--JvmMs

Initial memory pool size in MB

--JvmMx

Maximum memory pool size in MB

--JvmSs

Thread stack size in KB

--StartImage

Executable that will be run.

--StartPath

Working path for the start image executable.

--StartClass

Class that will be used for startup.

--StartParams

List of parameters that will be passed to either StartImage or
StartClass. Parameters are separated using either # or
; character.

--StartMethod

Main

Method name if differs then main

--StartMode

executable

Can one of jvmjava or exe

--StopImage

Executable that will be run on Stop service signal.

--StopPath

Working path for the stop image executable.

--StopClass

Class that will be used on Stop service signal.

--StopParams

List of parameters that will be passed to either StopImage or
StopClass. Parameters are separated using either # or
; character.

--StopMethod

Main

Method name if differs then main

--StopMode

executable

Can one of jvmjava or exe

--StopTimeout

No Timeout

Defines the timeout in seconds that procrun waits for service to
exit gracefully.

--LogPath

working path

Defines the path for logging

--LogPrefix

jakarta_service

Defines the service log filename

--LogLevel

INFO

Defines the logging level and can be either error,
info, warn or debug

The safest way to manually install the service is to use the provided
service.bat script. Administrator privileges are required to run this
script. If necessary, you can use the /user switch to specify
a user to use for the installation of the service.

NOTE: On Windows Vista or any other operating system with User
Account Control (UAC) you must either disable UAC or right-click on cmd.exe and
select "Run as administrator" in order to run this script. If UAC is enabled
neither being logged on with an Administrator account, nor using the
/user switch is sufficient.

Install the service named 'Tomcat7'
C:\> service.bat install

There is a 2nd optional parameter that lets you specify the name of the
service, as displayed in Windows services.

Install the service named 'MyService'
C:\> service.bat install MyService

To run the service in console mode, you need to use the //TS// parameter.
The service shutdown can be initiated by pressing CTRL+C or
CTRL+BREAK.
If you rename the tomcat7.exe to testservice.exe then you can just execute the
testservice.exe and this command mode will be executed by default.

Run the service named 'Tomcat7' in console mode
C:\> tomcat7 //TS//Tomcat7 [additional arguments]
Or simply execute:
C:\> tomcat7

Tomcat supports installation of multiple instances. You can have a single
installation of Tomcat with multiple instances running on different IP/port
combinations, or multiple Tomcat versions, each running one or more instances on
different IP/ports.

Each instance folder will need the following structure:

conf

logs

temp

webapps

work

At a minimum, conf should contain a copy of the following files from
CATALINA_HOME\conf\. Any files not copied and edited, will be picked up by
default from CATALINA_HOME\conf, i.e. CATALINA_BASE\conf files override defaults
from CATALINA_HOME\conf.

server.xml

web.xml

You must edit CATALINA_BASE\conf\server.xml to specify a unique IP/port for the
instance to listen on. Find the line that contains

<Connector port="8080" ...

and add an address attribute and/or
update the port number so as to specify a unique IP/port combination.

To install an instance, first set the CATALINA_HOME environment variable to the
name of the Tomcat installation directory. Then create a second environment
variable CATALINA_BASE and point this to the instance folder. Then run "service
install" command specifying a service name.

set CATALINA_HOME=c:\tomcat_7
set CATALINA_BASE=c:\tomcat_7\instances\instance1
service install instance1

To modify the service settings, you can run tomcat7w //ES//instance1.

For additional instances, create additional instance folder, update the
CATALINA_BASE environment variable, and run the service install again.

set CATALINA_BASE=c:\tomcat_7\instances\instance2
service install instance2