Running Robocorp Workforce Agent Core as a Windows Service

Control Room allows you to manage, orchestrate, and schedule the execution of your software robots in a central place. Robocorp Cloud has Processes, which contain steps that Environments execute.

This article instructs how to set up the Robocorp Workforce Agent Core background process on a Windows machine.

The primary purpose of running Robocorp Workforce Agent Core as a service is to set up your machine as a constant Environment resource in Robocorp Cloud just by having the machine powered on.


  • If you are not familiar with Windows Services, this might not be relevant for you.
  • To follow along, you will need a Robocorp Cloud account and Robocorp Workforce Agent Core. If you haven't already, you might want to follow the Quickstart guide first to get familiar with Robocorp Cloud.
  • You need to have administrator permissions on the machine to set up the Windows Service.


A Windows Service does not have UI access to applications; this means that you can run so-called headless operations and access the machine and user resources, but you cannot, for example, take screenshots of Windows application UI's.

Set up the user for the Windows Service

The setup is simple if you log in to Windows as the user you want the Windows Service to run. The permissions of this user determine what the Windows Service can access.

The reason for running robots on local machines is to have access to some user-level resources or permissions, so running the Robocorp Workforce Agent Core as a Windows Service requires you to use some existing user account that can log in to the machine. You can set up a separate local user or use an Active Directory user.

Note: Setting up this user's permissions on the machine with the principle of least privilege is the most effective way of introducing better security.

Installing the Windows Service

To help out in the setup, we provide a simple CLI helper tool to avoid as much of the hassle as possible on setting up Windows Services. The helper tool downloads the Robocorp Workforce Agent Core and all needed tools and sets up the service.

Steps below detail the setup.

1. Get the helper tool to the target machine

Get the Robocorp Service Helper here

2. Fill in the arguments for the helper command

robocorp-service-helper.exe install --name "Robocorp Workforce Agent" --instance-path "C:\robocorp\wfa-service" --robocorp_home "C:\robocorp\wfa-service\home" --domain %USERDOMAIN% --username %USERNAME% --env-name "Windows machine XYZ" --link-token <link token from Robocorp Cloud>

  • --name "Robocorp Workforce Agent" <-- Name for the Windows Service
  • --instance-path "C:\robocorp\wfa-service" <-- Path the service uses to store run data
  • --robocorp_home "C:\robocorp\wfa-service\home" <-- Path the service uses for environment caching
  • --domain <-- Domain of the user the service runs as.
    • If you are running these as the targetted user %USERDOMAIN% should be a reliable way to get the right domain.
  • --username <-- Username of the user the service runs as.
    • If you are running these as the targetted user %USERNAME% variable holds the correct name
  • --env-name "Windows machine XYZ" <-- Environment will get this name in Robocorp Cloud
  • --link-token <link token from Robocorp Cloud>
    • Get the link token from Robocorp Cloud: Go to correct workspace > Environments > Link token
      link-tokenToken is only used for linking and only valid for 1 hour, so no need to store this anywhere.

3. Run the helper command


4. Define the user for the service

You can use the default Windows Services application to set the user for the service.

  • Start menu > type Services
  • Find the service name you gave to the command and open Properties.
  • Give the username and password to Log On > This accountservice-user

Note: You can also set Recovery options for the service as you choose.

5. Start the service

  • You can do this via the default Services application service-start

6. All done

You should now see a new environment in Robocorp Cloud with the name you gave in the command in Idle state, ready for work. done

June 28, 2021