Overview of running PcVue as a Windows Service

This book assumes that the reader has some familiarity with running a Windows application as a service. Suggested reading for those readers who want to refresh their knowledge is the document Services in Windows published by Microsoft. At the time of writing this was available using the following Url: http://www.microsoft.com/whdc/system/sysinternals/windows-services.mspx

What is a Windows Service?

A Windows Service is a program like any other intended to run on a Windows operating system. However, programs intended to run as a Windows Service have particular characteristics:

  • Expected to run continuously or at least for long periods
  • Perform very specific functions
  • Usually run with privileges of Local System, Local Service or Network Service built-in service account privileges
  • Interact with the Windows Service Control Manager:
    • Register
    • Start
    • Stop
    • Pause

The consequences of which is that they:

  • Do not require user interaction
  • Can be configured to start:
    • Automatically on system start-up
    • Manually as required

Typical roles of PcVue that benefit from running as a Windows Service

 PcVue roles that may benefit from running as a Windows Service are those that require independence from user sessions and high availability during normal operations:

  • Data acquisition
  • Historical data production
  • Web & Mobile back end
  • Gateway server

Deployment steps to run PcVue as a Windows service

Follow the following steps to deploy PcVue as a Windows service:

  1. Select the account that will be used to run the SV Core Daemon as a Windows service.
    See Options for selecting the Service Account for more information.
    1. In most cases, you will want to create a specific service account and a specific user group that defines the list of user accounts that is able to access PcVue and the HDS when they are running as a Windows service.
      See Creating a Specific Service Account to Run PcVue for more information.
    2. Add permissions to the PcVue installation folder.
      See the permissions section in Creating a Specific Service Account to Run PcVue for more information.
    3. Define the DCOM settings.
      See the DCOM settings section in Creating a Specific Service Account to Run PcVue for more information.

    The creation of a specific user group makes it easier to manage the required permissions on the file system and DCOM settings.

  2. Configure the SV Core Daemon service
    1. Start-up options.
      See SV Core Management console General Properties tab for more information.
    2. User accounts.
      See SV Core Management console User Accounts tab for more information.
    3. Windows service properties.
      See SV Core Management console Service Properties tab for more information.
  3. Select the mode to run SV Core Daemon and monitor the running processes.
    See SV Core Management console Overview tab for more information.

What you need to know when running PcVue as a Windows service

If you run PcVue as a Windows service, the following element are not available or cannot be used:

  • There is no user interface. Therefore you need at least one other PcVue station configured as a client, or WebVue, to display mimics.
  • No user interface means that the Event Viewer normally displayed using F7 is not available. Instead, you need to monitor events from the logging and tracing sub-system. See the topic Logging and tracing for more information.
  • Only one instance of PcVue process can be executed at a time. You cannot start another instance of PcVue if one is already running on the same computer.
  • You cannot use:
    • DDE communication (client or server)
    • Graphical printing
    • Anything that requires User interaction
      • VBA - Scripts can be run but must be started by some method that does not require user interaction, and they should not require any user interaction to go to completion. As an example, any instructions that have an HMI (MsgBox for example) must not be used.
      • SCADA Basic - Programs can be run but must be started by some method that does not require user interaction. Any instructions related to the HMI or requiring user interaction (Window for example) must not be used.
      • External DLL called from VBA or SCADA Basic if they require user interaction.
      • SV Manager extensions if they require user interaction.
  • You cannot access resources using mapped drive letters. Instead, you must use the Universal Naming Convention name. For example “\\MyServer\MyFolder”.
  • You cannot start PcVue in a Remote Desktop Session. If your deployment includes usage of RDS, PcVue must be configured for running as a desktop application on the computer that is the RDS server. See Deploying PcVue on a RDS host for more information.

In particular, you are required to carefully monitor logged events related to the license handling. By default, PcVue will start in Trial mode if it cannot access its license at startup, and it will shut down automatically after the grace period if it loses access to its license while running.

Using PcVue configuration and diagnostic tools

The Application Explorer, Application Architect and Smart Generators can all be used. They can be started in an interactive session on the same computer than PcVue instance running as a Service. This is also possible using a Remote Desktop session. They can be started by using the shortcuts provided in PcVue program group in the Start menu.

The same goes for tools and utilities for administrators such as the Core Management Console, the Log Monitor or the License Utility.