Create the interface service
- Last UpdatedApr 03, 2023
- 2 minute read
To run an unattended interface as a service that restarts when the computer starts, create a Windows service for the interface. Use PI ICU to create the interface service.
PI ICU version 1.4.14.18 or later automatically selects the most-secure service account type as the default to run the interface service, and PI Buffer Subsystem (pibufss) can use the most-secure service account type.
Note: PI Buffer Subsystem 2018 SP2 Patch 2 or higher is required. Also, in order to assure that PI buffering functions properly, the user specified in the "Log on as" portion of the Service tab must be a member of the "PI Buffering Administrators", or the "PI Buffer Writers" user groups. A virtual service account can be added to those local groups, just like with any local/domain account. Failure to add a user to at least one of these user groups could result in a failure to buffer data. For more details, see the PI Buffer Subsystem user guide.
PI ICU uses the following defaults for creating services:
-
For Windows 7 and Windows Server 2008 R2 and later, uses a Virtual Account
-
For Windows Vista and Windows Server 2008 and earlier, uses a Network Service account
Note: Follow best security practices when selecting your service account type. For information about interface security, see Security requirements and best practices for interfaces.
In some case it may not be possible to create the interface service using PI ICU. In these cases, see the OSIsoft Knowledge Base article How do you create a new PI Interface Windows service.
Unless performance counters for the interface are disabled, define the scan classes before you create the interface service. For more information about scan classes, which are defined using the f startup parameter, see Standard parameters.
-
In PI ICU, select the interface instance and navigate to the Service page.
-
Select either Auto or Manual in the Startup Type area.
-
Ensure the buffering service is added in the Dependencies list.
If the buffering service has not been added, select the buffering service from the Installed services list and click < to move it to the Dependencies list.
-
Click Create.
Once the interface service is created, you can optionally restrict access to folders and files through the property page in Windows Explorer. You can also restrict registry key access through regedit.exe. Consider whether or not the interface requires access to specific files or folders before restricting access permissions for the service.