as a command line parameter.
If a parameter is repeated, then normally the last value takes precedence.
However some parameters can take multiple values - for example StartParams and JvmOptions.
If these parameters are prefixed with ++, then the value will be appended to the existing value.
For example:
Parameter Name |
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 delayed, auto or manual |
--Type |
|
Service type can be interactive to allow the service to interact with the desktop.
This option can only be used with the LocalSystem account. |
++DependsOn |
|
List of services that this service depends on. Services are separated
using either # or ; characters |
Note: At installation, additional dependencies will be created
on the services Tcpip and Afd if not explicitly
specified. These additional dependencies will not be created
automatically when updating the service configuration with
--DependsOn and must be explicitly defined if required in that
case.
++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 embed either # or ; character within a value put them inside single quotes.
|
--User |
|
User account used for running executable. It is used only for
StartMode Java or exe and enables running applications
as a service under an account without the LogonAsService privilege. |
--Password |
|
Password for user account set by --User parameter |
--ServiceUser |
|
Specifies the name of the account under which the service should run.
Use an account name in the form DomainName\UserName.
The service process will be logged on as this user.
if the account belongs to the built-in domain, you can specify .\UserName
Note that the Service Control Manager does not accept localised forms of
the standard names so to use them you need to specify
NT Authority\LocalService, NT Authority\NetworkService or
LocalSystem as appropriate.
|
--ServicePassword |
|
Password for user account set by --ServiceUser parameter |
--LibraryPath |
|
Directory added to the search path used to locate the DLLs for the JVM.
This directory is added both in front of the PATH environment variable
and as a parameter to the SetDLLDirectory function.
|
--JavaHome |
JAVA_HOME |
Set a different JAVA_HOME than defined by JAVA_HOME environment
variable |
--Jvm |
auto |
Use either auto (i.e. find the JVM from the Windows registry) or specify the full path to the jvm.dll.
You can use environment variable expansion here. When auto is specified the following search order is used:
- The current Java runtime library as defined in the registry
- The current JRE as defined in the registry
- The explicitly configured JavaHome for the service
- The current JDK as defined in the registry
|
++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. If you need to embed either # or ;
character put them inside single quotes. (Not used in exe mode.) |
++JvmOptions9 |
|
List of options in the form of -D or -X that will be
passed to the JVM when running on Java 9 or later. The options are
separated using either # or ; characters. If you need to
embed either # or ; character put them inside single quotes.
(Not used in exe mode.) |
--Classpath |
|
Set the Java classpath. (Not used in exe mode.) |
--JvmMs |
|
Initial memory pool size in MB. (Not used in exe mode.) |
--JvmMx |
|
Maximum memory pool size in MB. (Not used in exe mode.) |
--JvmSs |
|
Thread stack size in KB. (Not used in exe mode.) |
--StartMode |
|
One of jvm, Java or exe.
The modes are:
- jvm - start Java in-process. Depends on jvm.dll, see --Jvm.
- Java - same as exe, but automatically uses the default Java executable, i.e. %JAVA_HOME%\bin\java.exe.
Make sure JAVA_HOME is set correctly, or use --JavaHome to provide the correct location.
If neither is set, procrun will try to find the default JDK (not JRE) from the Windows registry.
- exe - run the image as a separate process
|
--StartImage |
|
Executable that will be run. Only applies to exe mode. |
--StartPath |
|
Working path for the start image executable. |
--StartClass |
Main |
Class that contains the startup method.
Applies to the jvm and Java modes. (Not used in exe mode.)
|
--StartMethod |
main |
Name of method to be called when service is started.
It must be static void and have argument (String args[]) .
Only applies to jvm mode - in Java mode, the main method is always used.
Note: in jvm mode, the start method should not return until the stop method
has been called.
|
++StartParams |
|
List of parameters that will be passed to either StartImage or
StartClass. Parameters are separated using either # or
; character. |
--StopMode |
|
One of jvm, Java or exe.
See --StartMode for further details.
|
--StopImage |
|
Executable that will be run on Stop service signal. Only applies to exe mode. |
--StopPath |
|
Working path for the stop image executable. Does not apply to jvm mode. |
--StopClass |
Main |
Class that will be used on Stop service signal.
Applies to the jvm and Java modes.
|
--StopMethod |
main |
Name of method to be called when service is stopped.
It must be static void and have argument (String args[]) .
Only applies to jvm mode.
In Java mode, the main method is always used.
|
++StopParams |
|
List of parameters that will be passed to either StopImage or
StopClass. Parameters are separated using either # or
; character. |
--StopTimeout |
No Timeout |
Defines the timeout in seconds that procrun waits for service to
exit gracefully. |
--LogPath |
%SystemRoot%\System32\LogFiles\Apache |
Defines the path for logging. Creates the directory if necessary. |
--LogPrefix |
commons-daemon |
Defines the service log filename prefix. The log file is created in the LogPath directory with
.YEAR-MONTH-DAY.log suffix |
--LogLevel |
Info |
Defines the logging level and can be either Error, Warn
Info, Debug, or Trace. (Case insensitive). Note
that for all log entries, the maximum length of the message component of
the log entry is 4096 characters.
|
--LogJniMessages |
0 |
Set this non-zero (e.g. 1) to capture JVM jni debug messages in the procrun log file.
Is not needed if stdout/stderr redirection is being used.
Only applies to jvm mode.
|
--StdOutput |
|
Redirected stdout filename. If named auto file is created
inside LogPath with the name service-stdout.YEAR-MONTH-DAY.log. |
--StdError |
|
Redirected stderr filename. If named auto file is created
in the LogPath directory with the name service-stderr.YEAR-MONTH-DAY.log. |
--PidFile |
|
Defines the file name for storing the running process id.
Actual file is created in the LogPath directory |