0% found this document useful (0 votes)
6 views

VTScada as a Windows® Service v1

The document provides detailed instructions on installing and running VTScada as a Windows service, highlighting necessary permissions, installation processes, and potential issues with third-party applications and licensing. It emphasizes the importance of using appropriate user accounts and permissions to avoid operational problems when switching between service and interactive modes. Additionally, it outlines how to access the VTScada Application Manager (VAM) from thin clients and the command line options for service management.

Uploaded by

Mário Yves
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

VTScada as a Windows® Service v1

The document provides detailed instructions on installing and running VTScada as a Windows service, highlighting necessary permissions, installation processes, and potential issues with third-party applications and licensing. It emphasizes the importance of using appropriate user accounts and permissions to avoid operational problems when switching between service and interactive modes. Additionally, it outlines how to access the VTScada Application Manager (VAM) from thin clients and the command line options for service management.

Uploaded by

Mário Yves
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

18/01/2025, 17:09 VTScada as a Windows® Service

Viewing: Use VTScada > Run and Configure > VTScada as a Windows® Service

VTScada as a Windows® Service


You can install VTScada to run as a Windows® service. After installation, you can stop and then re-start VTScada as either
a service or as an interactive program.

Note: User interface items may differ in appearance when rendered within a Windows
service. In particular, Windows control buttons will differ in appearance when viewed on a
mobile client.
Certain third-party applications may have limited interaction with the service.

Caution: Microsoft does not permit Windows services to access SAPI (the built in Windows
text-to-speech engine). This means that if you are using the VTScada Alarm Notification
System and you configure your application to run as a service, the outgoing alarm calls are
silent. You will not be able to use VOIP. As an alternative, we recommend you use the web-
based Twilio® platform for alarm annunciation. VTScada supports Twilio in version 11.3 and
higher).

Caution: When running VTScada as a Windows service, DO NOT select Excel as an output
destination or option from a Report Tag. As noted in the MSDN forums, office applications
assume they are being run under an interactive desktop. If Excel attempts to open a modal
dialog from a non-interactive service, the result is an invisible dialog that cannot be
dismissed, stopping the thread.

Besides the technical problems, you must also consider licensing issues. Microsoft's
licensing guidelines prevent Office applications from being used on a server to service client
requests, unless those clients themselves have licensed copies of Office. Using server-side
Automation to provide Office functionality to unlicensed workstations is not covered by
Microsoft's End User License Agreement (EULA).

If you have been running VTScada as an interactive program, it is necessary to install the service objects before you can
run the program as a service. You can do this using command line switches, or you may choose to repeat the full
installation, selecting the service option.

Note: Use caution if switching VTScada between running as a service and running as an
interactive program. Problems will occur if your user account does not have the same
permissions as the one under which VTScada runs as a service. If only one account has
access to the Data folder or sets elevated permissions on the files it creates, these problems
may be severe.

Rather than switch modes, you are advised to configure the VTScada Application Manager
script application so that it can be accessed using the VIC or the VTScada Anywhere Client
(Access the VAM from a Thin Client).
To do this, your license must allow at least one VTScada Thin Client connection. The VAM
can be run from only one Thin Client at a time.

After installation, the service will automatically start when Windows® starts. Note that a delayed start is configured by
default. It may be stopped and started through the Windows® Service Control Manager or using the command line, which
is the recommended option.
vts.exe /s=start

vts.exe /s=stop

VTScada security permissions are not required to stop the service.

Note: The Windows account used to issue service commands (e.g. starting and stopping
the VTScada service) must have administrative privileges (and, if using the command line,
the console must be run with administrator privileges).
The account under which VTScada runs when running as a service or interactively must
have read / write access to the VTScada installation folder, sub-folders and to any other
folders external to the installation folder that might be used for data storage.
If running as a service under a regular user account, then to access Workstation Status
Driver values e.g. CPU, the account must be a member of the local "Performance Monitor
Users" group.

The application that will be available through your VTScada service must exist on the server, and be configured to auto-
start. Because VTScada cannot run as a service and as an interactive program at the same time on the same workstation,
the following procedure is suggested.
1. Install VTScada and run as an interactive program.
2. Create or install the application.
3. Configure the VTScada Thin Client Server, to allow VTScada Thin Client connections.
4. Configure the application to auto-start.
5. Configure the VAM as described in Access the VAM from a Thin Client.
6. Stop the interactive VTScada session.
7. Run VTScada as a service, re-installing to add the service components if this was not done earlier.
The command-line syntax is recommended.
8. Start the VTScada service.
When VTScada is running as a service, all operational access to your application is through other workstations where
VTScada is installed and running as an interactive program, or through VTScada Thin Client connections. Ensure that your
VTScada license permits the maximum number of simultaneous Thin Client connections that you expect. System
messages that would otherwise have been shown on the interactive console are directed to a VIC connection. Error
messages are directed to the Windows® event log.
You can use a VIC connection to perform tag configuration.
To perform development work, do any of:
Install VTScada on a second server and configure your server list. Use Get From Server to install the
application on the second workstation. Configuration changes will be deployed from one to the other.

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_VTScadaService.htm?Highlight=service 1/2
18/01/2025, 17:09 VTScada as a Windows® Service
Connect Using the VTSX Program (or if available, Internet Explorer). This provides access to the Tag
Browser, Application Configuration and (if licensed) the Idea Studio.
Connect Using the Anywhere Client, which provides access to both the Tag Browser and the
Application Configuration dialog but not the Idea Studio.
ChangeSets, created on a non-networked workstation, can be copied to the server, then applied
using the VIC. The identical application must be installed on the second workstation.
Stop the service and re-start as an interactive session. Ensure that you are logged into Windows
using an account that has permissions that match those being used by the service, so that file
changes can be saved. Perform the development work. Re-start VTScada as a service.
Plan for Troubleshooting

Note: If you plan to allow programmers and developers to use an Internet connection to
access diagnostic applications such as the Source Debugger or TraceViewer, then you must
secure those applications and add them to one or more Internet Realms.

Tip: People sometimes ask how they can tell whether VTScada is running as a service. To
answer that question, use the Windows Task Manager. (keyboard combination: Ctrl-Alt-Del).
Assuming that VTScada is in fact running, then if it shows in the list of applications, it is not
running as a service. If it shows under the list of background processes (or on the Services
tab of the Task Manager) then it is running as a service.
If VTS doesn't show in any list, it is not running on this workstation. The Task Manager won't
tell you what is running on remote servers. In this case, if you can see your application, you
must be using a Thin Client, and from here you have no way to know whether the server is
running in desktop or service mode.

Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2023 All rights reserved.

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_VTScadaService.htm?Highlight=service 2/2
18/01/2025, 17:10 Access the VAM from a Thin Client

Viewing: Use VTScada > Run and Configure > VTScada Application Manager (VAM) > Access the VAM from a Thin
Client

Access the VAM from a Thin Client


For those running VTScada as a Windows® Service, it is possible to access the VTScada Application
Manager (VAM) using either the VTScada Internet Client (VIC) or the VTScada Anywhere Client. Only
one client at a time may access the VAM, or other script applications on that VAM, using this method. The
mobile client cannot be used for this purpose.

Note: To access applications from an Thin Client (including script applications) each must
be secured and you must be able to sign in to an account that holds the Thin Client Access
privilege.

Features are limited according to the type of thin client in use:


Mobile client: No access to the VAM
VTScada Anywhere client: Access the VAM as an application, but no ability to use Find
Existing, Get from ChangeSet or Clone from ChangeSet.
VTScada Internet Client: Access the VAM as an application, but no ability to use Find
Existing.
Prerequisites:
1. You are running VTScada as a Windows service.
This is mandatory. The following steps assume that you have already installed VTScada as
a service and are switching to desktop mode temporarily. The required command line
switches are documented in Service Command Line Reference
2. Configure a VTScada Thin Client Server.
Steps:
1. Stop VTScada as a service on the server.
vts.exe /s=stop ... where VTS.exe is located in the folder C:\Program
Files\Trihedral\VTScada\VTScada_YourVersionNumber
2. Start VTScada as a desktop application on the server (vts.exe)
3. Add the Application Manager script application to the VAM as an existing application.
(Find Existing ) By definition, it will already be running.
4. Open the Application Properties dialog for that script application.
5. Select the Edit Security page.
6. Enable security.
7. Create a user account and grant it the VTScada Thin Client privilege.
8. Create a new realm that includes this application.
DO NOT add this application to an existing realm.
DO NOT add other applications to this realm. (Configure a Realm)
9. Stop VTScada as a desktop application on the server.
10. Restart VTScada as a service. (vts.exe /s=start)
11. Connect to the realm you created, using either the VTScada Internet Client (VIC) or the
VTScada Anywhere Client.
Note: As with any script application, to which you plan to make an Internet connection, do
not configure the application to start automatically. Doing so is both unnecessary and
undesirable.

Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2023 All rights reserved.

file:///C:/VTScada/VTSHelp/Content/D_Tools/D_VAMoverVIC.htm 1/2
18/01/2025, 17:10 Access the VAM from a Thin Client

file:///C:/VTScada/VTSHelp/Content/D_Tools/D_VAMoverVIC.htm 2/2
18/01/2025, 17:10 Service Installation

Viewing: Use VTScada > Run and Configure > VTScada as a Windows® Service > Service Installation

Service Installation
Before installing VTScada to run as a service, it is important to understand Windows account permissions.

Note: The Windows account used to issue service commands (e.g. starting and stopping
the VTScada service) must have administrative privileges (and, if using the command line,
the console must be run with administrator privileges).
The account under which VTScada runs when running as a service or interactively must
have read / write access to the VTScada installation folder, sub-folders and to any other
folders external to the installation folder that might be used for data storage.
If running as a service under a regular user account, then to access Workstation Status
Driver values e.g. CPU, the account must be a member of the local "Performance Monitor
Users" group.

Accounts and Permissions


You must provide the account credentials that VTScada will use when running as a service. You can use any user account
that has permission to access the VTScada installation folders. You can use your regular user account or create one
specifically to run VTScada under. (The second option is recommended.) On a domain system, your IT administrator can
ensure that the correct permissions are set up for the user account.

Having the ability to sign in to the same user account that VTScada will run under allows you to configure aspects of the
user account and also to run VTScada in interactive mode as the same user account it will run under when running as a
service. But, you are advised not to run VTScada using an account that has administrator privileges.
Windows Security Integration can be used when VTScada is run as a service, but the account under which the service is
run must allow the COM operations required for the AD queries.

Notes:
If the VTScada service is shut down, and VTScada restarted as an interactive program, then it will
use the currently signed in account while in interactive mode. . If this differs from the account that
VTScada uses when running as a service, you might not have access to logged data, alarm history
and other files written using the service account, and therefore VTScada will be unable to perform
required file operations during the interactive session.
Certain components (DCOM objects in particular) must grant the user attached to the VTScada Service
permissions beyond those given to the administrator by default. For the OPC service, VTScada does this
automatically.

Installation Process
There are two ways to install VTScada to run as a service:
Choose the Install VTScada Service option during the standard installation.

On a workstation where VTScada is installed, stop the program, then run the executable from the
command line, using the /s switch.

If running the standard installation, you will select the account to use and enter the credentials in a dialog:

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_ServiceInstallation.htm?tocpath=Use VTScada%7CRun and Configure%7CVTScada as a… 1/2


18/01/2025, 17:10 Service Installation

Note: In the following examples, the square brackets are part of the command. Do not add a
space before the brackets.

If installing from the command line, you will enter the account selection and credentials as part of the command switch.
Install the VTScada service with a fully-qualified user name and password:
vts.exe /s=install[username][password]

Domain accounts should be specified as "DOMAIN\account.name". If your password contains non-alphanumeric characters
then you may need to quote the option. For example: /S="install[username][password]".

To remove the service registration use:


vts.exe /s=uninstall

Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2023 All rights reserved.

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_ServiceInstallation.htm?tocpath=Use VTScada%7CRun and Configure%7CVTScada as a… 2/2


18/01/2025, 17:10 Service Command Line Reference

Viewing: Use VTScada > Run and Configure > VTScada as a Windows® Service > Service Command Line Reference

Service Command Line Reference


The following command line options are recognized. (These must be run from a command prompt.)

Caution: USE OF THE LOCAL SYSTEM OR LOCAL SERVICE ACCOUNT IS STRONGLY


DISCOURAGED.

vts.exe /s=install Install VTScada as a service using the Windows® operating system account, "Local System". Reinstalls if
previously installed.

Caution: Permitted, but strongly discouraged.

vts.exe /s=install[NT Install VTScada as a service using the Windows account, "Local Service". Reinstalls if previously
AUTHORITY\LocalService] installed.

Caution: Permitted, but strongly discouraged.

vts.exe Install VTScada as a service using an account of your choice. Reinstalls if previously installed.
/s=install[username]
[password]
vts.exe Run VTScada as an application. Fails if the service is not stopped.
vts.exe /s=start Run the VTScada service, installing it first if not present.
vts.exe /s=stop Stops the service if it is running but leaves it installed.
vts.exe /s=uninstall Uninstall the service. Will fail if the service is running.
vts.exe /s=disable Disable the VTScada service, this leaves the service installed but prevents it from starting.
vts.exe /s=enable Enable the VTScada service if it was previously disabled. This restores the ability to start the service.

Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2023 All rights reserved.

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_ServiceCmdLineRef.htm?tocpath=Use VTScada%7CRun and Configure%7CVTScada as… 1/1


18/01/2025, 17:10 Service Error Dialogs

Viewing: Use VTScada > Run and Configure > VTScada as a Windows® Service > Service Error Dialogs

Service Error Dialogs


Server-side dialogs are redirected to a VTScada Thin Client if one is available. By default, this is the longest-running
connection because that connection is most likely in a control room.
You can set the preference for which VTScada Thin Client will receive the message by adding a configuration section to
your Setup.INI file, found in the VTScada installation folder. Note that changes to that file do not take effect until you restart
VTScada.
Client selection done by selecting the account name signed in at each VTScada Thin Client connection. Thus, the list is
titled "Default-User-Sessions" and will contain the account names. All VIC connections are checked for each account listed
in order. The messages will go to that client connection.
[Default-User-Sessions]
Joe
Bob
Mary

If you are running more than one application, you can have server messages go to the first client connection where a given
application is running. For example, if one of the applications is named "Demo" and you would like server messages to go
to whichever client connection is running that application (if available), then the list might be written as follows:
[Default-User-Sessions]
Demo
Joe
Bob
Mary

In the event that two clients match the given criteria, then the messages will go to the one that was running for the longest
time.

Displayed when someone attempts to start an interactive VTScada session on a workstation where the VTScada service is
running.

Displayed when someone attempts to start VTScada as a service on a workstation where it is already running.

Displayed if you attempt to stop the VTScada service using the command line if the console is not running with
administrative privileges, or while signed in on an account that does not have sufficient permissions.

Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2023 All rights reserved.

file:///C:/VTScada/VTSHelp/Content/D_Customize/Dev_ServiceErrors.htm?tocpath=Use VTScada%7CRun and Configure%7CVTScada as a Win… 1/1

You might also like