Skip to main content
Skip table of contents

Install Runtime as a Windows service

To set up and execute DATPROF Runtime as a Windows service, the Windows Service Wrapper (WinSW) tool is used. This tool comes bundled with the standard installation package. All associated documentation, shortcuts, and configuration files can be found in the winsw subfolder within the Runtime installation directory.

Initial Steps

Before installing Runtime as a Windows service, make sure that DATPROF Runtime is not running.

The steps to prepare and extract the software for installing Runtime as a Windows service are the same as those followed for a normal installation.

The DatprofRuntimeService.exe tool is used to manage DATPROF Runtime as a service.

To view all available parameters, open the command prompt and run: DatprofRuntimeService.exe /?

DATPROF Runtime Windows service options.png

Configure DATPROF Runtime as a Windows service

To customize the configuration of DATPROF Runtime as a Windows service, navigate to the following folder: <Datprof Runtime Installation Folder>\winsw

Open the DatprofRuntimeService.xml file in a text editor.

This file includes a predefined set of parameters provided by the WinSW project, which you can modify as needed. These parameters control the service behavior, such as execution paths, logging, and service dependencies.

After making your changes, save the file. The updated configuration will be applied the next time the service is started.

Edit the file: DatprofRuntimeService.xml

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

CODE
<configuration>
  <!-- %BASE% = the full path to the directory of this xml file. -->

  <!-- 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>

  <workingdirectory>%BASE%\..</workingdirectory>

  <!-- Path to the executable, which should be started -->
  <executable>%BASE%\..\jdk\bin\java.exe</executable>
  <argument>-Djava.library.path=lib\drivers</argument>
  <argument>-cp</argument>
  <argument>lib\*;lib\drivers\*</argument>
  <argument>com.datprof.runtime.service.RuntimeApplication</argument>

  <!--
     ============================
     *** Change this argument ***
     ============================

     Path to the Runtime data directory (must be the full path!).
  -->
  <argument>"C:\PATH TO THE\DATA"</argument>

</configuration>

Do not change the order of the arguments.

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.

After this, save the file.

Install / Uninstall DATPROF Runtime as a Windows service

To install DATPROF Runtime as a Windows service, follow these steps:

  1. Open the Command Prompt (CMD) with administrator privileges.

  2. Navigate to the winsw folder in the DATPROF Runtime installation directory:
    cd <DATPROF Runtime Installation Folder>\winsw

  3. Execute the following command to install the service:
    DatprofRuntimeService.exe install

DATPROF Runtime as a windows service installation.PNG

Once completed, the DATPROF Runtime will appear in the Services management console (MMC) as a Windows service.

DATPROF Runtime as a Windows Service installed.PNG

To uninstall DATPROF Runtime as a Windows service, follow these steps:

  1. Make sure the Runtime service is stopped.

  2. Open the Command Prompt (CMD) with administrator privileges.

  3. Navigate to the winsw folder in the DATPROF Runtime installation directory:
    cd <DATPROF Runtime Installation Folder>\winsw

  4. Execute the following command to install the service:
    DatprofRuntimeService.exe uninstall

This will uninstall the DATPROF Runtime Windows service.

DATPROF Runtime as a windows service uninstall.PNG

Starting and Stopping DATPROF Runtime as a Windows service

The startup type for the DATPROF Runtime Windows service is set to Automatic by default. This ensures that the service starts automatically when the system reboots.

Manually starting DATPROF Runtime when installed as a service:

  1. Open Command Prompt (CMD) with administrator privileges.

  2. Navigate to the winsw folder in the DATPROF Runtime installation directory:
    cd <DATPROF Runtime Installation Folder>\winsw

  3. Execute the following command to start the service:
    DatprofRuntimeService.exe start

This will start the Runtime service.

DATPROF Runtime as a windows service start.PNG

Manually stopping DATPROF Runtime when installed as a service:

Stop a started DATPROF Runtime as a service:

  1. Open Command Prompt (CMD) with administrator privileges.

  2. Navigate to the winsw folder in the DATPROF Runtime installation directory:
    cd <DATPROF Runtime Installation Folder>\winsw

  3. Execute the following command to start the service:
    DatprofRuntimeService.exe stop

This will stop the Runtime service.

DATPROF Runtime as a windows service stop.PNG

Advanced configuration

The default configuration file, DatprofRuntimeService.xml, provides a basic set of parameters. For additional options, refer to the example file, DatprofRuntimeService-allOptions.xml, which contains a full list of configurable arguments.

If you need to run the service under a different user, copy the relevant section from the example file and modify it as needed. Then, add the updated section to DatprofRuntimeService.xml.

After making changes, save the file. The updated configuration will take effect the next time the service is started.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.