Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

Run a project as a Windows service

  • Last UpdatedOct 29, 2026
  • 10 minute read

Your project can be configured to run under Windows services.

Microsoft Windows services, formerly known as NT services, allow you to create long-running programs that run in their own Windows sessions. These sessions can be automatically started when the computer starts up, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. You can also run services in the security context of a specific user account that is different from the logged-on user or the default computer account. For more information about services, please refer to the Microsoft Developer Network (MSDN) Library.

Why would you want to run your project under Windows services?

  • To ensure that your project always runs with whatever system privileges it needs, regardless of the privileges of the user that is currently logged on to Windows;

  • To prevent the user from interfering with your project while it is running; or

  • To let your project keep running when there is no user logged on at all.

Create and configure the Windows service

Note: To perform these actions, you must be logged on as a user with Administrator privileges and you should know how to use the Computer Management console. (To access the console, right-click the Computer icon, and then click Manage on the shortcut menu.)

There are two ways to create and configure the Windows service for your project: you can use the Service Configuration tool in the AVEVA Edge development environment, or you can use the command-line utility that is installed with the software.

Service Configuration Tool

You can configure and run a new service from within the development environment by clicking Service on the Project tab of the ribbon. This opens the Service Configuration dialog box:

service configuration

Application

The location of the project file (<project name>.app) that the service will load and run when it is started. This must be a complete file path. Use the browse button (…) to find and select the project file on your computer.

User virtual service account

Selected by default. The service runs under its own low-privilege Windows account (NT Service\<service name>), which is the most secure option. Clear this option only if you need to run the service under a specific Windows user, and then enter that user in User and Password.

User

The Windows user account under which the service will run. This is an optional setting; if it is not used, then the service will run under Local System.

Note: Try to avoid running the service under Local System. That account has too much privilege to the file system and too little privilege to run the OPC Client and Server modules properly. The best alternative is to create a user solely to run AVEVA Edge and configure its privileges to fit the needs of your project. For more about this, see Configuring User Privileges below.

A Studio Database Gateway that is started by a project that runs as a service uses the service account. By default this is the virtual service account NT Service\<service name>. It is Local System only when the virtual service account option is cleared and no user is set. With Use Gateway Credentials, that account is the identity sent to AVEVA Historian. In this case, use Use Specific User Name and Password instead. For more information, see Configure Historian authentication.

Password

The password for the specified user account. This is an optional setting; it is not needed if no user is specified or if the specified user does not have a password.

Startup type

How the Windows service will start. The following options are available:

  • Automatic: The service will start automatically when the computer starts up.

  • Manual: The service can be started manually in the Computer Management console or by clicking Start, as described below.

  • Disabled: The service will be created and then disabled. It cannot run until a user with Administrator privileges enables it in the Computer Management console.

Action pane

Start or stop the service. Please note that these buttons are not enabled until the service is actually created.

Creating a new service

To create a new service:

  1. Next to the Project box, click … to open a standard Windows file browser. Use the browser to find and select your project file.

  2. In the User and Password boxes, type the username and password (if any) for the Windows user account under which the service will run.

  3. Select a Startup Type.

  4. Click Apply. The service is created with the specified settings.

After the service has been created, it will appear in the Services console (This PC > Control Panel > System and Security > Administrative Tools > Services) under the name "AVEVA Edge". You can use that console to quickly stop and restart the service, if you do not want to run the AVEVA Edge development application.

Command-line utility

You can also configure the service by using the command-line utility, StdSvcInst.exe. It offers a few more options than the Service Configuration tool described above — such as specifying a name and description for the service — and it can be used without running the AVEVA Edge development application. The utility is located in the Bin folder of the program directory. To run the utility, open a command prompt, navigate to the Bin folder (C:\Program Files (x86)\AVEVA\AVEVA Edge 2026\Bin), and then enter the command with the desired parameters.

The utility has the following command syntax:

StdSvcInst { -create -app filepath -startup { auto | manual | disabled } -user username -password password -name displayname -descr description | -start | -stop | -delete }

-create

Creates the Windows service.

-app filepath

Specifies which project file (<project name>.app) the service will load and run when it is started. (This is the same as the Project box in the Service Configuration dialog.) You must include the complete file path, and it must be enclosed in quotes.

This parameter is required when you create a new service.

-startup { auto | manual | disabled }

Specifies how the service will start. (This is the same as the Startup Type in the Service Configuration box.) This parameter is optional; if it is not used, then the default behavior for a new service is manual.

-user username

Specifies the Window user account under which the service will run. (This is the same as the User box in the Service Configuration dialog.) This parameter is optional; if it is not used, then the service will run under Local System.

-password password

Specifies the password for the given user account. (This is the same as the Password box in the Service Configuration dialog described above.) This parameter is optional; it is not needed if no user is specified or if the specified user does not have a password.

-name displayname

Defines the service name that is displayed in the Computer Management console. The name must be enclosed in quotes. This parameter is optional; the default name is "Studio".

-descr description

Defines the service description that is displayed in the Computer Management console. The description must be enclosed in quotes. This parameter is optional.

-start

Starts the service. This is the same as starting the service using the Computer Management console or by clicking Start in the Service Configuration dialog.

-stop

Stops the service. This is the same as stopping the service using the Computer Management console or by clicking Stop in the Service Configuration dialog.

-delete

Deletes the service.

Example: Creating the service

In this example, we want to create a new Windows service with the following options:

AVEVA Edge Project File

C:\Users\<user name>\Documents\AVEVA Edge2026 Projects\<project name>\<project name>.app

Startup Mode

Automatic

User

AVEVA Edge

Password

AVEVA Edge

Service Name

"AVEVA Edge"

Service Description

"Starts AVEVA Edge project"

Note that the system must already have a user account named "AVEVA Edge" with password "AVEVA Edge".

So, to create the service with the desired options:

  1. Make sure you are logged on as a user with Administrator privileges.

  2. Open a command prompt (Start > Windows System > Command Prompt).

  3. Navigate to the Bin folder:

    cd "C:\Program Files (x86)\AVEVA\AVEVA Edge 2026\Bin"

  4. Enter the command:

    StdSvcInst –create –app "C:\Users\<user name>\Documents\AVEVA Edge2026 Projects\<project name>\<project name>.app" -startup auto –user AVEVA Edge -password AVEVA Edge –name "AVEVA Edge" –descr "Starts AVEVA Edge project"

    If the procedure is successful, then the system will display the message Service created. Otherwise, it will display an error message.

    Example: Changing the project file

    After you create the service, you may want to change the project file that it runs. You can do this by using the -app parameter:

    1. Make sure you are logged on as a user with Administrator privileges.

    2. Stop the service if it is running.

    3. Open a command prompt.

    4. Navigate to the Bin folder.

    5. Enter the command — for example, to set MyProject as the project file:

      StdSvcInst –app "C:\Users\<user name>\Documents\AVEVA Edge2026 Projects\MyProject\MyProject.app"

      Example: Deleting the service

      To delete the service:

      1. Make sure you are logged on as a user with Administrator privileges.

      2. Stop the service if it is running.

      3. Open a command prompt.

      4. Navigate to the Bin folder.

      5. Enter the command:

        StdSvcInst –delete

        Configure user privileges

        The service will run under the privileges of the user account specified in the User field of the Service Configuration tool (or by the -user parameter of the command-line utility). If AVEVA Edge needs some system resource to which that account does not have privileges, it will fail. Therefore, you must configure the account to have the necessary privileges.

        Note: The following actions can be performed only by a user with Administrator privileges.

        Enabling the User Account to Log On as a Service

        Before anything else, the specified user account must be enabled to log on to the computer as a service. To enable the account:

        1. Open the Local Security Settings console (This PC > Control Panel > System and Security > Administrative Tools > Local Security Policy).

        2. In the console window, select the User Rights Assignment folder (Security Settings > Local Policies > User Rights Assignment).

        3. In the list of policies, double-click Log on as a service.

          The Log on as a service dialog box is displayed.

        4. Click Add User or Group.

          The Select Users or Groups dialog is displayed.

        5. Type the name of the user account under which you want the service to run.

        6. Click OK.

          Giving the User Account Full Control Over the Project Folder

          For your project to run properly, the specified user account must have full control over the project folder and all of the files in it. To give the account those privileges:

          1. In Windows Explorer, locate your project folder (that is, the folder that contains the file <project name>.APP).

          2. Right-click the folder, and then click Properties on the shortcut menu.

          3. In the properties sheet, click the Security tab, and then click Edit.

          4. In the Permissions dialog box, click Add, and then add the user account that you specified when you created the service.

          5. Select the user that you added, and then in the list of permissions, set Full Control to Allow.

          6. Click OK to apply your changes and close the dialog, and then click OK again to close the properties sheet.

            Allowing the User Account to Run the OPC Client/Server Module

            As mentioned previously, normal users have too few privileges to properly run the OPC Client/Server module. Therefore, you must configure the user account to have those privileges:

            1. Open the Component Services console (This PC > Control Panel > System and Security > Administrative Tools > Component Services).

            2. In the console window, select the DCOM Config folder (Console Root > Component Services > Computers > My Computer > DCOM Config).

            3. In the DCOM Config pane, right-click OPC DA Server, and then click Properties on the shortcut menu.

            4. In the properties sheet, click the Identity tab.

            5. Select This user and then complete the fields with the same username and password that you specified when you created the service.

            6. Click OK to apply your changes and close the properties sheet.

            7. Close the Component Services console.

              Troubleshooting

              When you run your project as a Windows service, it has no user interface. Therefore, if an error occurs, it will only be logged as a Windows application event. You can check the messages by using the Event Viewer console (This PC > Control Panel > System and Security > Administrative Tools > Event Viewer).

              Closing a project that is configured as a service

              In order to enhance project security, you will be queried on closing to confirm you trust this project that is configured to run as a Windows service.

              Trust Project Configured as a Window Service dialog

              Confirm that you trust the project to run as a Windows service by choosing Yes.

              If you choose No, the project will still close, but it will not run as Windows service the next time is it run. The Windows Event Viewer will show an error, as shown below. In order to run it, open the project and confirm that you trust it to run as Windows service. For more information on opening a project that is configured to run as a service, see Open Project.

              Windows Event Viewer showing Windows service error

              Tip: If the project is running as a Windows service at the time the changes are made and saved in the IDE, those changes will not be updated until the project is stopped, the changes are saved, the project is trusted to run as a Windows service, and the service is restarted.

              In This Topic
              Related Links