As of DATPROF Runtime version 3.17 the files required to Run DATPROF Runtime as are included in the distribution.

To configure and start DATPROF Runtime as a service we use the Windows Service Wrapper tooling. (winsw)

See: https://github.com/kohsuke/winsw

The tool is available in the winsw subfolder of the DATPROF Runtime Installation Folder.



Initial Steps

(info) make sure DATPROF Runtime is not running.

The Preparation and Extraction of the software to install DATPROF Runtime as a Windows service are identical to the steps for the normal installation.



Configure DATPROF Runtime as a Windows service

To configure this setup go to the folder <Datprof Runtime Installation Folder>\winsw

Edit the file: DatprofRuntimeService.xml

This file contains a selected set of parameters provided by the winsw project.

<configuration>
  <!-- ID of the service. It should be unique accross the Windows system-->
  <id>DatprofRuntimeService</id>
  
  <!-- Display name of the service -->
  <name>DATPROF Runtime Service</name>
  
  <!-- Service description -->
  <description>DATPROF Runtime Service application.</description>
  
  <!-- Path to the executable, which should be started -->
  <executable>%BASE%\..\jre\bin\java.exe</executable>
  <argument>-jar</argument>
  <argument>%BASE%\..\lib\runtime-service.jar</argument>
  <argument>%BASE%\..\data</argument>
</configuration>
CODE


The most important entry is the last argument which refers to the <DATPROF Runtime Data Folder>.

In this configuration file the %BASE% variable points to the <DATPROF Runtime Installation Folder>. The use of %BASE% is optional.

Modify this argument to point it to the correct DATA folder.

(info) Do not change the order of the arguments.

Save the file.


Install / Uninstall DATPROF Runtime as a Windows service

Open a command box as an administrator

To make the configuration work we use the tool DatprofRuntimeService.exe.

this a renamed version of winsw.exe.

(info) By opening a command box and issuing the command: DatprofRuntimeService.exe /?  it shows the possible parameters.


Now install the service.

execute:
cd <DATPROF Runtime Installation Folder>\winsw

DatprofRuntimeService.exe install

You can see this in the services MMC.This will install DATPROF Runtime as a Windows Server


To uninstall the service

execute:
cd <DATPROF Runtime Installation Folder>\winsw

DatprofRuntimeService.exe uninstall

Start / Stop DATPROF Runtime as a Windows service


Start DATPROF Runtime when installed as a service:

execute:
cd <DATPROF Runtime Installation Folder>\winsw

DatprofRuntimeService.exe start


Now DATPROF Runtime is installed and started as a service.

Stop a started DATPROF Runtime as a service:


execute:
cd <DATPROF Runtime Installation Folder>\winsw

DatprofRuntimeService.exe stop



Advanced configuration

The default configuration file DatprofRuntimeService.xml contains a limited set of possible arguments.

More options are available and can be investigated in the example configuration file: DatprofRuntimeService-allOptions.xml

You might consider running this service using another user. Add and modify the required section from the example file to DatprofRuntimeService.xml.