Running LiveView Server as a Windows Service

This topic describes how to create and activate a LiveView Service entry on Windows, and how to activate that service. LiveView can only be started with a compiled project with a minimal configuration, so you will need to have a configured project that you want to have running as the Windows service.

Creating the LiveView Service

A Windows service is an executable that can be set to run automatically when Windows is booted, and to remain running as a background process. This example creates a service for running the Hello LiveView sample project.

  1. Open a StreamBase command prompt as administrator.

  2. Navigate to the directory that contains the project directory. This example uses lv-sample-helloliveview in the following directory:

    C:\Program Files (x86)\StreamBase Systems\StreamBase.n.m\liveview\sample

  3. Use the lv-server command with the install-service option. This example uses the sample project lv-sample-helloliveview, service name hellolv and service display name Hello LiveView. This single command is shown on two lines for clarity:

    lv-server install-service lv-sample-helloliveview
         --service-name "hellolv,Hello LiveView"
    

Activating the LiveView Service

To activate the default installed LiveView service so that it starts at Windows boot time:

  1. Open the Windows Services control panel, as shown in the example below.

  2. Locate the Hello LiveView entry.

  3. To start the service one time for testing, click the Start the service link on the left, or right-click and select Start.

  1. To start the service every time Windows boots, follow these steps:

    1. Double-click the entry. This opens the Properties dialog, like the example below.

    2. In the Startup type drop-down list, select Automatic.

    3. If you need to be able to run the service as a particular user, click the Log on tab and enter your username and password.

Removing a LiveView Service

If you need to remove a StreamBase service, use the remove-service option. To identify the service to remove, use only the first argument you gave with the install-service option. For example:

lv-server remove-service --service-name hellolv