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.
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.
-
Open a StreamBase Command Prompt as administrator.
-
Navigate to the directory that contains the Hello LiveView project directory in your Studio workspace. The following example on Windows show the location of the Hello LiveView sample as loaded into the Studio workspace of the user named
sbuser
:cd "C:\Users\
sbuser
\StreamBase Studio 7.6 Workspace\sample_lv-helloliveview" -
Use the lv-server command with its
install-service
option. The following example uses a period to specify the current directory as the LiveView project to load (assuming you have navigated there as shown in step 2). The command specifies the service namehellolv
and service display nameHello LiveView
.lv-server install-service . --service-name "hellolv,Hello LiveView"
To activate the default installed LiveView service so that it starts at Windows boot time:
-
Open the Windows Services control panel, as shown in the example below.
-
Locate the Hello LiveView entry.
-
To start the service one time for testing, click the Start the service link on the left, or right-click and select Start.
-
To start the service every time Windows restarts, follow these steps:
-
Double-click the entry. This opens the Properties dialog, like the example below.
-
In the Startup type drop-down list, select Automatic.
-
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.
-
If you need to remove a LiveView service, open a StreamBase Command Prompt as administrator, and run another lv-server command, this time using the remove-service
option. To identify the service to remove, specify only the short service name in the first argument you gave with the install-service
option. For example:
lv-server remove-service --service-name hellolv